Esempio n. 1
0
 private void LateUpdate()
 {
     if (StateReciever.GetState() == States.INACTIVE)
     {
         return;
     }
     position += Input.GetAxisRaw("Horizontal") * changeAmount;
     position  = Mathf.Clamp(position, -maxValue, maxValue);
 }
Esempio n. 2
0
 void FixedUpdate()
 {
     if (StateReciever.GetState() == States.INACTIVE)
     {
         return;
     }
     GetInput();
     Move();
     Jump();
 }
Esempio n. 3
0
 void Update()
 {
     if (StateReciever.GetState() == States.INACTIVE)
     {
         return;
     }
     if (attackTracker == AttackTracker.IDLE && Input.GetAxisRaw("Attack") != 0)
     {
         Shoot();
     }
 }
Esempio n. 4
0
 void FixedUpdate()
 {
     if (StateReciever.GetState() == States.INACTIVE)
     {
         return;
     }
     if (attackTracker == AttackTracker.RELOAD)
     {
         if (reloadTracker > reloadTime)
         {
             reloadTracker = 0;
             attackTracker = AttackTracker.IDLE;
         }
         else
         {
             reloadTracker++;
         }
     }
 }