コード例 #1
0
 // Use this for initialization
 void Start()
 {
     if (id == 1)
     {
         dir [0] = -1;
         dir [1] = 0;
     }
     else
     {
         dir [0] = 1;
         dir [1] = 0;
     }
     personControl = GetComponent <ThirdPersonUserControl> ();
     personControl.setOnRunFinished(() => {
         ensureIsOnBoard();
         GameManager.Instance.changeTurn();
     });
     GameManager.Instance.setOnPlayerChangeListener(id, () => {
         int[] dim = defaultBlock();
         TileManager.Instance.selectBlock(dim[0], dim[1]);
     });
     GameManager.Instance.setOnLoseListener(id, () => {
         TileManager.Instance.disappear(current_x, current_y);
     });
 }