This file contains hidden or 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 DG.Tweening; | |
| using DG.Tweening.Core; | |
| using DG.Tweening.Plugins.Options; | |
| using UnityEngine; | |
| namespace Tools | |
| { | |
| public static class DOTweenEx | |
| { | |
| public static TweenerCore<float, float, FloatOptions> DOAlpha( |
This file contains hidden or 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 UnityEngine.UI; | |
| namespace Script.Tools | |
| { | |
| [RequireComponent(typeof(CanvasScaler))] | |
| [ExecuteAlways] | |
| public class SizePerfectCanvas : MonoBehaviour | |
| { | |
| [SerializeField] private CanvasScaler canvasScaler; |
This file contains hidden or 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 Tools | |
| { | |
| [ExecuteAlways] | |
| public class SizePerfectCamera : MonoBehaviour | |
| { | |
| [SerializeField] private new Camera camera; | |
| [Space] [Tooltip("摄像机的尺寸范围(最小值,最大值)")] [SerializeField] |
This file contains hidden or 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 BinaryIndexedTree(private var nums: IntArray) { | |
| var size: Int = nums.size | |
| private val _bit = IntArray(size + 1) | |
| init { | |
| for (i in 0 until size) init(i, nums[i]) | |
| } | |
| private fun init(index: Int, value: Int) { | |
| var i = index + 1 |
This file contains hidden or 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 System.Collections.Generic; | |
| using UnityEngine; | |
| namespace Utils | |
| { | |
| public class GroundHelper | |
| { | |
| private const float minMoveDistance = 0.001f; | |
| private const float shellRadius = 0.01f; |
This file contains hidden or 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.Generic; | |
| using UnityEngine.SceneManagement; | |
| namespace Tools | |
| { | |
| public static class SceneStacker | |
| { | |
| private static readonly Stack<string> SceneStack = new(); | |
| private static bool sIsInitialization; |
This file contains hidden or 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
| // https://stackoverflow.com/questions/36888780/how-to-make-an-invisible-transparent-button-work | |
| // file Touchable.cs | |
| // Correctly backfills the missing Touchable concept in Unity.UI's OO chain. | |
| using UnityEngine; | |
| using UnityEngine.UI; | |
| #if UNITY_EDITOR | |
| using UnityEditor; | |
| [CustomEditor(typeof(Touchable))] | |
| public class Touchable_Editor : Editor |
This file contains hidden or 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 System.Collections; | |
| using UnityEngine; | |
| namespace Util | |
| { | |
| public static class AnimationCurveEx | |
| { | |
| public static IEnumerator PlayEvaluate(this AnimationCurve curve, float time, Action<float> action, params Tuple<float, Action>[] animationEvents) | |
| { |
This file contains hidden or 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() | |
| { |
This file contains hidden or 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; |