Ejemplo n.º 1
0
    bool CheckFreeSpace(int Row, int Col)
    {
        StageScriptNetwork stage = GameObject.FindGameObjectWithTag("Stage").GetComponent <StageScriptNetwork> ();

        if ((Row > 7) || (Row < 0) || (Col > 7) || (Col < 0))
        {
            return(false);
        }
        for (int i = 1; i <= 4; i++)
        {
            if (i == playerNumber)
            {
                continue;
            }
            if (stage.positionMatrix [Row, Col] == i)
            {
                return(false);
            }
        }
        return(true);
    }
Ejemplo n.º 2
0
    public void CmdUpdateStage(int Row, int Col, int PlayerNumber, GameObject thestage)
    {
        StageScriptNetwork stage = thestage.GetComponent <StageScriptNetwork> ();

        stage.RpcUpdateStage(Row, Col, PlayerNumber);
    }
Ejemplo n.º 3
0
    public void CmdUpdateScore(int _player, int _sco, GameObject thestage, string _name)
    {
        StageScriptNetwork stage = thestage.GetComponent <StageScriptNetwork> ();

        stage.RpcUpdateScore(_player, _sco, _name);
    }
Ejemplo n.º 4
0
    public void RpcUpdatePosition(int row, int col, int Number)
    {
        StageScriptNetwork TheStage = GameObject.FindGameObjectWithTag("Stage").GetComponent <StageScriptNetwork> ();

        TheStage.positionMatrix [row, col] = Number;
    }