// Start is called before the first frame update void Start() { _playerWepCtrl = _playerObj.GetComponent <PlayerWeaponsFire>(); startTime = Time.time; _laserCharging = true; StartCoroutine(playChargeSound()); }
private void Start() { _spawnManager = GameObject.Find("SpawnManager").GetComponent <SpawnManager>(); if (_spawnManager == null) { Debug.LogError("Missing Spawn Manager"); } _playerWeapon = GameObject.Find("Player").GetComponent <PlayerWeaponsFire>(); if (_playerWeapon == null) { Debug.LogError("Player Weapon is NULL"); } _cameraShake = GameObject.FindWithTag("MainCamera").GetComponent <CameraShake>(); if (_cameraShake == null) { Debug.LogError("Camera Shake is NULL."); } health = 3; maximumHealth = 3; }