Exemple #1
0
    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);
    }
Exemple #2
0
 public void SetTargetStates(BallThrownState ballThrownState)
 {
     _ballThrownState = ballThrownState;
 }