Пример #1
0
    void Move()
    {
        float x = Input.GetAxisRaw("Horizontal");
        float y = Input.GetAxisRaw("Vertical");

        if (TurnController.CheckTurn() == 0)
        {
            Sis        = Input.inputString;
            SisMove[0] = new Vector3(x, y, 0);
        }
        if (TurnController.CheckTurn() == 1)
        {
            SisMove[1] = new Vector3(x, y, 0);
            int n = (Sis == Input.inputString)?1:-10;
            Players[0].SendMessage("ChangeMP", n);
            Players[1].SendMessage("ChangeMP", n);
            Players[0].transform.position += SisMove[0];
            Players[1].transform.position += SisMove[1];
        }
    }