void OnActionPerformed(GameAction action)
 {
     if (cooldown != null)
     {
         cooldown.Activate();
     }
 }
Esempio n. 2
0
        public void CreateCooldown() {
            float cooldownTime = 10.0f;
            Cooldown cooldown = new Cooldown(cooldownTime, cooldownTime);
            cooldown.Activate();

            Assert.IsTrue(cooldown.OnCooldown);
            Assert.IsFalse(cooldown.IsReady);

            cooldown.Step(2.0f);
            cooldown.Step(2.0f);
            cooldown.Step(2.0f);
            cooldown.Step(2.0f);
            cooldown.Step(2.0f);

            Assert.IsTrue(cooldown.IsReady);
            Assert.IsFalse(cooldown.OnCooldown);


        }
Esempio n. 3
0
 public override void OnUsage()
 {
     timer.Activate();
 }
Esempio n. 4
0
 void Shoot()
 {
     Debug.Log("pew");
     // activate cooldown
     cd_shooting.Activate();
 }