Refactor player and enemy scripts; remove unused classes and improve initialization
- Added base initialization call in PlayerController. - Changed player reference in EnemyAI to be serialized for better inspector visibility. - Ensured characters are initialized upon spawning in EnemySpawner. - Removed obsolete EnemyAI and Chest scripts to streamline codebase. - Added KeyChest script for key collection functionality. - Introduced new meta files for better organization and tracking. - Created launch configuration for Unity debugging.
This commit is contained in:
@@ -40,6 +40,7 @@ public class EnemySpawner : MonoBehaviour
|
||||
_respawnElementTimer = _respawnTimeout;
|
||||
var prefab= Instantiate(_prefab, _spawnPoint.position, _spawnPoint.rotation);
|
||||
var character=prefab.GetComponent<Character>();
|
||||
character.Init();
|
||||
character.OnCharacterDeath+=OnCharacterDeath;
|
||||
|
||||
_characters.Add(character);
|
||||
|
||||
Reference in New Issue
Block a user