Пример #1
0
 // Use this for initialization
 void Start()
 {
     //Set variables
     player1 = FindObjectOfType <Player1Movement> ();
     player2 = FindObjectOfType <Player2Movement> ();
     rigid1  = player1.GetComponent <Rigidbody> ();
     rigid2  = player2.GetComponent <Rigidbody> ();
 }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     //Finds the players
     Player1 = FindObjectOfType <Player1Movement> ();
     Player2 = FindObjectOfType <Player2Movement> ();
     rigid1  = Player1.GetComponent <Rigidbody> ();
     rigid2  = Player2.GetComponent <Rigidbody> ();
 }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     //Set variables
     player1           = FindObjectOfType <Player1Movement> ();
     player2           = FindObjectOfType <Player2Movement> ();
     rigid1            = player1.GetComponent <Rigidbody> ();
     rigid2            = player2.GetComponent <Rigidbody> ();
     player1GameObject = player1.gameObject;
     player2GameObject = player2.gameObject;
     isThrowable       = false;
 }