public void Awake() { // Get reference to player camera controller _cameraController = FindObjectOfType<PlayerCameraController>(); if (_cameraController == null) { Debug.LogError("Unable to find player camera controller within scene"); } _mainCamera = _cameraController.GetComponentInChildren<Camera>(); // Get reference to player _player = FindObjectOfType<Player>(); if (_player == null) { Debug.LogError("TouchInput script unable to find player script within scene"); } }
public void Awake() { // Initialise lists _sheep = new List<Explodable>(); _crates = new List<Explodable>(); _nukeSheep = new List<Explodable>(); _generators = new List<Explodable>(); _explodables = new List<Explodable>(); // Get reference to player _player = FindObjectOfType<Player>(); if (_player == null) { Debug.LogError("(Scene Manager) Unable to find player within scene"); } }