protected new void Awake() { base.Awake(); (_rend = GetComponent <SpriteRenderer>()).enabled = false; (_coll = GetComponent <Collider2D>()).enabled = false; _rb = GetComponent <Rigidbody2D>(); ChargingState s1 = new ChargingState(_ASM, this); BallThrownState s2 = new BallThrownState(_ASM, this); s1.SetTargetStates(s2); _ASM.InitializeWithStates(new InactiveEnabledAttackState(_ASM, this), s1); }
public void SetTargetStates(BallThrownState ballThrownState) { _ballThrownState = ballThrownState; }