Ejemplo n.º 1
0
 public void Initialize(CharacterModel characterModel)
 {
     this.loadSprites(characterModel);
     this.spriteRenderer        = gameObject.GetComponent <SpriteRenderer>();
     this.spriteRenderer.sprite = down1;
     currentAnimateState        = characterAnimateState.DOWN;
     _prevAnimateState          = characterAnimateState.DOWN;
     isStart = true;
 }
Ejemplo n.º 2
0
 void Left()
 {
     sprite1 = left1;
     sprite2 = left2;
     if (_prevAnimateState != characterAnimateState.LEFT)
     {
         this.cnt          = FRAME;
         _prevAnimateState = characterAnimateState.LEFT;
     }
 }
Ejemplo n.º 3
0
 void Right()
 {
     sprite1 = right1;
     sprite2 = right2;
     if (_prevAnimateState != characterAnimateState.RIGHT)
     {
         this.cnt          = FRAME;
         _prevAnimateState = characterAnimateState.RIGHT;
     }
 }
Ejemplo n.º 4
0
 void Down()
 {
     sprite1 = down1;
     sprite2 = down2;
     if (_prevAnimateState != characterAnimateState.DOWN)
     {
         this.cnt          = FRAME;
         _prevAnimateState = characterAnimateState.DOWN;
     }
 }
Ejemplo n.º 5
0
 void Up()
 {
     sprite1 = up1;
     sprite2 = up2;
     if (_prevAnimateState != characterAnimateState.UP)
     {
         this.cnt          = FRAME;
         _prevAnimateState = characterAnimateState.UP;
     }
 }