void Start() { _state = new TankState(gameObject, 0, Vector2.up); _currentWeapon = _mainWeapon.GetComponent <Weapon>(); // optimization _transform = transform; }
public void ChangeState(TankState state) { _state = state; _state.UpdateState(); }