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