private static void OnChanged() { if (CupheadTime.onChangedEvent != null) { CupheadTime.onChangedEvent(); } }
public float this[Layer layer] { get { return(Time.deltaTime * CupheadTime.GetLayerSpeed(layer) * CupheadTime.GlobalSpeed); } }
public static void SetAll(float value) { CupheadTime.GlobalSpeed = value; Layer[] values = EnumUtils.GetValues <Layer>(); foreach (Layer key in values) { CupheadTime.layers[key] = value; } CupheadTime.OnChanged(); }
void Fly_Enter() { _animator.Play("Atk_Weapon"); // if ( DamageKey == "Atk_3" ) { // transform.GetChild ( 1 )?.SetLocalPosition ( 0f, -0.545f ); // } _attackEventListener.OnHitPlayerEnterEvent += OnAttackHit; CupheadTime.WaitForSeconds(this, FlyDestroyTime, CupheadTime.Layer.Enemy, () => currentState = State.Boom); }
void Fly_Enter() { _animator.Play("Atk_Weapon"); CupheadTime.WaitForSeconds(this, FlyDestroyTime, CupheadTime.Layer.Enemy, () => { if (currentState == State.Fly) { currentState = State.Fade; } }); _damageDealer.ignoreReceiverOnDealDamage = true; // Debug.Log ( $"angle: {angle}" ); }
void Track_Enter() { CupheadTime.WaitForSeconds(this, Duration, CupheadTime.Layer.Enemy, () => currentState = State.Fade); _timer = 0f; transform.SetPosition(Target.position.x); }
protected Coroutine DelayTask(float time, System.Action callback) { return(CupheadTime.WaitForSeconds(pmFSM, time, timeLayer, callback)); }
public static Coroutine WaitForUnpause(MonoBehaviour m) { return(m.StartCoroutine(CupheadTime.waitForUnpause_cr())); }
public static Coroutine WaitForSeconds(MonoBehaviour m, float time, Layer layer, Action <float> onUpdate) { return(m.StartCoroutine(CupheadTime.waitForSeconds_cr(time, layer, null, onUpdate))); }
public static Coroutine WaitForSeconds(MonoBehaviour m, float time, Layer layer, Action onCompleted) { return(m.StartCoroutine(CupheadTime.waitForSeconds_cr(time, layer, onCompleted))); }
public static Coroutine WaitForSeconds(MonoBehaviour m, float time) { return(m.StartCoroutine(CupheadTime.waitForSeconds_cr(time, Layer.Default))); }
public static void Reset() { CupheadTime.SetAll(1f); }
public static void SetLayerSpeed(Layer layer, float value) { CupheadTime.layers[layer] = value; CupheadTime.OnChanged(); }