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