Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     healthBar.fillAmount = hp;
     anim.SetFloat("hp", hp);
     if (shake == true)
     {
         cs.cameraShake();
         if (cs.shakeTimer <= 0)
         {
             shake = false;
             cs.reload();
         }
     }
 }
Exemplo n.º 2
0
 public void Activate()
 {
     if (i >= 4)
     {
         if (timer > 0)
         {
             TimerStart();
             cs.cameraShake();
             cs.shakeTimer = 2f;
         }
         else
         {
             CancelInvoke("decreaseTimer");
             nextQns();
             timer = 3f;
         }
     }
 }
Exemplo n.º 3
0
 void countDown()
 {
     if (countdownT > 0)
     {
         countdownT -= 0.002f;             //10sec
     }
     if (countdownT < 0)
     {
         cs.cameraShake();
         if (cs.shakeTimer <= 0)
         {
             wt.nextQns();
             hp.damage();
             countdownT    = 1f;
             cs.shakeTimer = 1f;
         }
     }
     clock.fillAmount = countdownT;
 }