Пример #1
0
 void Update()
 {
     // Stop our timers when power and abilities are done being used
     if (IsPowerActive())
     {
         curValue = Mathf.Max(curValue - ((maxValue / powerDuration) * Time.deltaTime), 0);
         if (abilityCooldownTimer.IsTimeUp())
         {
             abilityCooldownTimer.StopTimer();
         }
         if (curValue <= 0)
         {
             isPowerActive = false;
             abilityCooldownTimer.StopTimer();
         }
     }
 }
Пример #2
0
    /*
     * Called when the ragdoll is done bringing the body parts back together.
     */
    public void OnBodyRevived()
    {
        reviveTimeout.StopTimer();
        isReviving       = false;
        IsDead           = false;
        collider.enabled = true;

        PigmentBody body = (PigmentBody)playerGeo.GetComponent <PigmentBody> ();

        body.RestoreBody();

        DoBlockClearExplosion();

        GameManager.Instance.OnReviveDone();
    }