private void Awake() { surveyAnim = GetComponent <Animator>(); Assert.IsNotNull(surveyAnim, "Failed to find Animator component."); enemyPatrolDies = GetComponentInParent <EnemyPatrolDies>(); Assert.IsTrue(enemyPatrolDies, "Failed to get access to EnemyBehavior script."); Assert.IsNotNull(enemyLaserPrefab, "No reference to EnemyLaser Prefab."); Assert.IsNotNull(muzzleFlash, "No reference to MuzzeFlash game object."); }
private void Start() { Assert.IsNotNull(guardianLaserPrefab, "No refernce to GardianLaserPrefab."); enemyPatrolDies = GetComponentInParent <EnemyPatrolDies>(); Assert.IsTrue(enemyPatrolDies, "Failed to get access to EnemyBehavior script."); enemyGuardianAnimator = GetComponent <Animator>(); Assert.IsNotNull(enemyGuardianAnimator, "Failed to access to Animator component."); Assert.IsNotNull(muzzleFlashRed, "No reference to MuzzleFlashRed game object."); if (muzzleFlashRed != null) { muzzleFlashRed.SetActive(false); } }