Exemplo n.º 1
0
 // Update is called once per frame
 public void Update()
 {
     if (timer == Timer.RepositionTimer)
     {
         deltaTime += Time.deltaTime;
         if (deltaTime >= timeLimit)
         {
             startCooldownTimer();
         }
     }
     else if (timer == Timer.CooldownTimer)
     {
         deltaTime += Time.deltaTime;
         if (deltaTime >= timeLimit)
         {
             clearTimer();
         }
     }
     else
     {
         status = AIVehicle.RepositionStatus.ReadyToReposition;
     }
 }
Exemplo n.º 2
0
 public void clearTimer()
 {
     status    = AIVehicle.RepositionStatus.ReadyToReposition;
     timer     = Timer.None;
     deltaTime = 0;
 }
Exemplo n.º 3
0
 public void startCooldownTimer()
 {
     status    = AIVehicle.RepositionStatus.DontReposition;
     timer     = Timer.CooldownTimer;
     deltaTime = 0;
 }
Exemplo n.º 4
0
 public void startRepositionTimer()
 {
     status    = AIVehicle.RepositionStatus.Repositioning;
     timer     = Timer.RepositionTimer;
     deltaTime = 0;
 }