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); }
public void CmdUpdateStage(int Row, int Col, int PlayerNumber, GameObject thestage) { StageScriptNetwork stage = thestage.GetComponent <StageScriptNetwork> (); stage.RpcUpdateStage(Row, Col, PlayerNumber); }
public void CmdUpdateScore(int _player, int _sco, GameObject thestage, string _name) { StageScriptNetwork stage = thestage.GetComponent <StageScriptNetwork> (); stage.RpcUpdateScore(_player, _sco, _name); }
public void RpcUpdatePosition(int row, int col, int Number) { StageScriptNetwork TheStage = GameObject.FindGameObjectWithTag("Stage").GetComponent <StageScriptNetwork> (); TheStage.positionMatrix [row, col] = Number; }