This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.text.Selection | |
import android.text.Spannable | |
import android.text.Spanned | |
import android.text.method.BaseMovementMethod | |
import android.text.style.ClickableSpan | |
import android.view.MotionEvent | |
import android.view.View | |
import android.widget.TextView |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
[ExecuteInEditMode] | |
public class PixelCamera : MonoBehaviour { | |
public int referenceHeight = 180; | |
public int pixelsPerUnit = 32; | |
private int renderWidth; | |
private int renderHeight; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine; | |
namespace Utils | |
{ | |
public static class ComponentUtils | |
{ | |
/// <summary> | |
/// 将一个Component复制到另一个GameObject中 | |
/// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class XxxDialogFragment:DialogFragment(){ | |
override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? { | |
val view = inflater?.inflate(R.layout.dialog_share_vehicle, container, false) | |
dialog?.window?.apply { | |
setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT)) | |
requestFeature(Window.FEATURE_NO_TITLE) | |
} | |
return view | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun ImageView.setImageAsDrawable( | |
url: String, | |
@DrawableRes placeHolder: Int? = null | |
) { | |
Glide.with(this) | |
// .asBitmap() | |
.load(url) | |
.apply { | |
if (placeHolder != null) { | |
apply(RequestOptions().placeholder(placeHolder)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
namespace Game.Model | |
{ | |
/// <summary> | |
/// 有可拖拽的 | |
/// </summary> | |
public class Draggable : MonoBehaviour | |
{ | |
private float startPosX; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PhysicsObject : MonoBehaviour { | |
public float minGroundNormalY = .65f; | |
public float gravityModifier = 1f; | |
protected Vector2 targetVelocity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine; | |
namespace Lina.Scripts | |
{ | |
public struct Inputer2DHelper | |
{ | |
private Vector2 move; | |
private bool fire1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Common; | |
using UnityEngine; | |
using UnityEngine.InputSystem; | |
namespace Game | |
{ | |
public class InputCtlr : MonoBehaviour | |
{ | |
private InputActions inputActions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
namespace Game | |
{ | |
public class FillScreen : MonoBehaviour | |
{ | |
public SpriteRenderer sr; | |
private void Awake() | |
{ |