Exemple #1
0
    void Update()
    {
        x = GetInputX();
        y = GetInputY();

        if (CanMove())
        {
            Debug.Log("");
            character.MoveTo(gridDisplay.grid.GetWorldPosition(x, y));
        }
    }
Exemple #2
0
 IEnumerator MoveCharToXY()
 {
     while (true)
     {
         if (lastX >= 0 && lastX < 8 && lastY >= 0 && lastY < 8)
         {
             character.MoveTo(grid.grid.GetWorldPosition(lastX, lastY));
             soundManager.PlayRandomSound();
         }
         yield return(new WaitForSeconds(.5f));
     }
 }