示例#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();
         }
     }
 }
示例#2
0
 public void Activate()
 {
     if (i >= 4)
     {
         if (timer > 0)
         {
             TimerStart();
             cs.cameraShake();
             cs.shakeTimer = 2f;
         }
         else
         {
             CancelInvoke("decreaseTimer");
             nextQns();
             timer = 3f;
         }
     }
 }
示例#3
0
文件: CDTimer.cs 项目: njiajia/BOTNET
 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;
 }