void OnTriggerStay2D(Collider2D col) { if (transform.parent.uLinkNetworkView().GetScope(col.GetComponent <serverBallScript>().player) == false) { serverBallScript collideServerScript = col.GetComponent <serverBallScript>(); showPlayer(collideServerScript.player, collideServerScript.playerID, collideServerScript.hasJukeJuice, collideServerScript.hasRollingBomb, collideServerScript.isHonking, collideServerScript.hasFlag); } }
void endGameTime() { //so this function only runs once runEndGameOnce=true; //run end game function if(GameObject.FindGameObjectWithTag("Player")!=null) { serverBallScript serverScript = GameObject.FindGameObjectWithTag("Player").GetComponent<serverBallScript>(); serverScript.restartGame(2); } else{ serverStart serverScript = GameObject.FindGameObjectWithTag("server").GetComponent<serverStart>(); serverScript.restartGame(); } }
//if ball hits box trigger, set updates client ball recieves to true void OnTriggerEnter2D(Collider2D col) { serverBallScript collideServerScript = col.GetComponent <serverBallScript>(); showPlayer(collideServerScript.player, collideServerScript.playerID, collideServerScript.hasJukeJuice, collideServerScript.hasRollingBomb, collideServerScript.isHonking, collideServerScript.hasFlag); }