Пример #1
0
    protected new void Awake()
    {
        base.Awake();
        _coll  = GetComponent <PolygonCollider2D>();
        _rend  = GetComponent <SpriteRenderer>();
        _anim  = GetComponent <MyAnimator>();
        _audio = GetComponent <MyAudioSource>();

        _coll.enabled = false;
        _rend.enabled = false;
        enabled       = false;

        PushingSmallState s1 = new PushingSmallState(_ASM, this);
        PushingBigState   s2 = new PushingBigState(_ASM, this);

        s1.SetTargetStates(s2);

        _ASM.InitializeWithStates(new InactiveBaseAttackState(_ASM), s1);
    }
Пример #2
0
 public void SetTargetStates(PushingBigState pushingBigState)
 {
     _pushingBigState = pushingBigState;
 }