Beispiel #1
0
 // Start is called before the first frame update
 void Start()
 {
     this.states   = this.GetComponent <IPlayerStateMachine>();
     this.renderer = this.GetComponent <SpriteRenderer>();
     this.states.OnStateEnter(this.changeSpriteStanding, PlayerState.Standing);
     this.states.OnStateEnter(this.changeSpriteSitting, PlayerState.Looking);
 }
    void Start()
    {
        this.states = this.GetComponent <IPlayerStateMachine>();
        this.states.OnStateEnter(this.OnEnterLooking, PlayerState.Looking);
        this.states.OnStateStart(this.OnEnterLooking, PlayerState.Looking);
        this.states.OnStateEnter(this.OnEnterStanding, PlayerState.Standing);
        this.states.OnStateStart(this.OnEnterStanding, PlayerState.Standing);

        this.collider   = this.GetComponent <BoxCollider2D>();
        this.baseSize   = this.collider.size;
        this.baseOffset = this.collider.offset;
        this.UpdateQuad();
    }
 void Start()
 {
     this.states = this.GetComponent <IPlayerStateMachine>();
     this.states.OnStateUpdate(this.OnRollingUpdate, PlayerState.Rolling);
     this.states.OnStateExit(this.OnRollingExit, PlayerState.Rolling);
 }