Esempio n. 1
0
    private void MoveTo(GameObject sit)
    {
        BattlePoint fromPoint = new BattlePoint()
        {
            x = pickCpc.chessPiece.x,
            z = pickCpc.chessPiece.z
        };
        string name = sit.name;
        int    _x   = Convert.ToInt32(name.Substring(0, 1));
        int    _z   = Convert.ToInt32(name.Substring(1, 1));

        Debug.LogFormat("棋子移动目的地[{0},{1}]", _x, _z);
        BattlePoint toPoint = new BattlePoint()
        {
            x = _x,
            z = _z
        };
        MoveChess moveChess = new MoveChess()
        {
            fromPoint = fromPoint,
            toPoint   = toPoint
        };

        NetManager.SendMoveChess(moveChess);
    }
Esempio n. 2
0
 void Update()
 {
     if (isStart == 1)
     {
         battlePointCode = battlePoint.GetComponent <BattlePoint>();
         pos             = battlePointCode.points2[0];
         NewTower();
         isStart = 2;
     }
     else if (isStart == 3)
     {
         NewEnemy();
         FindBattle();
     }
     // Debug.Log("LifeValue" + lifeValue.lifeValue + "\t" + "GoldNum: " + goldNum.goldNum);
 }