예제 #1
0
 void Start()
 {
     grid = FindObjectOfType<GridManager>().Grid;
     currentNode = grid[rowStart, colStart];
     currentNode.Owner = this;
     transform.position = currentNode.transform.position;
     hand = new Hand();
     //state machine init
     machine = new PlayerStateMachine();
     renderTimer = 0;
     invunTimer = 0;
 }
예제 #2
0
 void Start()
 {
     Physics2D.IgnoreLayerCollision(8, 9);
     health = MAX_HEALTH;
     machine = new PlayerStateMachine(frameRate);
     anim = this.gameObject.GetComponent<Animator>();
     pos = this.gameObject.transform;
     doState = new state[] { Idle,
     Attacking, MovingAttack, InAirAttack, Move,
     Dashing, Jumping, InAirNow, OnWall, WallJump, Hit, Dead };
     attackPrefab = AttackPrefab;
 }
예제 #3
0
 void Start()
 {
     grid = FindObjectOfType<GridManager>().Grid;
     currentNode = grid[rowStart, colStart];
     currentNode.Owner = this;
     transform.position = currentNode.transform.position;
     deck = new Deck(FindObjectOfType<CardList>().Cards);
     hand = new Hand();
     //state machine init
     machine = new PlayerStateMachine();
     doState = new state[] { Idle, MoveBegining, MoveEnding, Hit, Dead, BasicAttack, Sword };
     renderTimer = 0;
     invunTimer = 0;
 }