Beispiel #1
0
 public virtual CharacterAnimation.characterAnimateState characterDirection(Cell currentCell, Cell towardCell)
 {
     if (towardCell.X > currentCell.X)
     {
         return(CharacterAnimation.characterAnimateState.RIGHT);
     }
     else if (towardCell.X < currentCell.X)
     {
         return(CharacterAnimation.characterAnimateState.LEFT);
     }
     else if (towardCell.Y < currentCell.Y)
     {
         return(CharacterAnimation.characterAnimateState.UP);
     }
     return(CharacterAnimation.characterAnimateState.DOWN);
 }
Beispiel #2
0
 public void SetFieldPos(Cell cell)
 {
     this.SetCurrentCell(cell);
     transform.localPosition = new Vector3(cell.PosX, cell.PosY, -1.0f);
 }