Beispiel #1
0
 private static void OnChanged()
 {
     if (CupheadTime.onChangedEvent != null)
     {
         CupheadTime.onChangedEvent();
     }
 }
Beispiel #2
0
 public float this[Layer layer]
 {
     get
     {
         return(Time.deltaTime * CupheadTime.GetLayerSpeed(layer) * CupheadTime.GlobalSpeed);
     }
 }
Beispiel #3
0
 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}" );
    }
Beispiel #6
0
 void Track_Enter()
 {
     CupheadTime.WaitForSeconds(this, Duration, CupheadTime.Layer.Enemy, () => currentState = State.Fade);
     _timer = 0f;
     transform.SetPosition(Target.position.x);
 }
Beispiel #7
0
 protected Coroutine DelayTask(float time, System.Action callback)
 {
     return(CupheadTime.WaitForSeconds(pmFSM, time, timeLayer, callback));
 }
Beispiel #8
0
 public static Coroutine WaitForUnpause(MonoBehaviour m)
 {
     return(m.StartCoroutine(CupheadTime.waitForUnpause_cr()));
 }
Beispiel #9
0
 public static Coroutine WaitForSeconds(MonoBehaviour m, float time, Layer layer, Action <float> onUpdate)
 {
     return(m.StartCoroutine(CupheadTime.waitForSeconds_cr(time, layer, null, onUpdate)));
 }
Beispiel #10
0
 public static Coroutine WaitForSeconds(MonoBehaviour m, float time, Layer layer, Action onCompleted)
 {
     return(m.StartCoroutine(CupheadTime.waitForSeconds_cr(time, layer, onCompleted)));
 }
Beispiel #11
0
 public static Coroutine WaitForSeconds(MonoBehaviour m, float time)
 {
     return(m.StartCoroutine(CupheadTime.waitForSeconds_cr(time, Layer.Default)));
 }
Beispiel #12
0
 public static void Reset()
 {
     CupheadTime.SetAll(1f);
 }
Beispiel #13
0
 public static void SetLayerSpeed(Layer layer, float value)
 {
     CupheadTime.layers[layer] = value;
     CupheadTime.OnChanged();
 }