public TankAttackState(TankStateMachine tank) { _stateMachine = tank; _oldPosition = tank.Tank.transform.position; _timer = 0f; _halt = false; }
public TankChaseState(TankStateMachine tank) { _stateMachine = tank; _oldPosition = tank.Tank.transform.position; _halt = false; _playerPoint = Vector2.zero; }
public TankPatrolState(TankStateMachine stateMachine) { _stateMachine = stateMachine; _enemyFound = false; _patrolPoint = Vector2.zero; }
void Start() { _rb2D = GetComponent <Rigidbody2D>(); Anim = GetComponent <Animator>(); _stateMachine = new TankStateMachine(this); }
public TankAlertState(TankStateMachine stateMachine) { _stateMachine = stateMachine; _cannotGo = false; _timeCounter = 0f; }