コード例 #1
0
 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);
     }
 }
コード例 #2
0
	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();


		}



	}
コード例 #3
0
    //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);
    }