Esempio n. 1
0
        private void CleanUpGameElements()
        {
            Camera.main.transform.SetParent(null);
            Camera.main.transform.position = Vector3.back;

            Destroy(_player.gameObject);
            _player = null;
        }
Esempio n. 2
0
        private void SpawnGameElements()
        {
            var playerprefab = Resources.Load("Player");
            var player       = (GameObject)Instantiate(playerprefab);

            _player = player.GetComponent <Player.Player>();
            Camera.main.transform.SetParent(_player.transform);
        }