Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class LevelManager : MonoBehaviour
- {
- public GameObject player1;
- public GameObject player2;
- public Inventory myInventory;
- void Start()
- {
- DontDestroyOnLoad(gameObject);
- myInventory = GameObject.FindObjectOfType<Inventory> ();
- if(myInventory.GetPlayer2() == true)
- {
- Instantiate(player2, player2.transform.position, Quaternion.identity);
- }
- else
- {
- Instantiate(player1, player1.transform.position, Quaternion.identity);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement