public void ProcessNextRoom()
        {
            _currentRoomIndex++;
            if (_currentRoom != null)
            {
                Destroy(_currentRoom);
                foreach (Transform child in AppModel.DropManager().GetDropped())
                {
                    Destroy(child.gameObject);
                }
            }
            var nextRoom = predefinedRooms[_currentRoomIndex];

            _currentRoom = Instantiate(nextRoom);
            _currentRoom.AddComponent <StraightRoomController>();
            AppModel.PlayerTransform().position = _currentRoom.transform.Find("StartPoint").position;
        }
Beispiel #2
0
 void Start()
 {
     _player = AppModel.PlayerTransform();
 }