// Use this for initialization void Start() { iceSpikesScript = transform.parent.GetComponent <IceSpikesBehaviour>(); if (iceSpikesScript == null) { Debug.LogError("Error: iceSpikesScript not found."); } }
void Awake() { currState = State.PATROL; thePlayer = GameObject.FindGameObjectWithTag("Player"); thePlayerStatus = thePlayer.GetComponent <PlayerStatus>(); bossAnimator = GetComponent <Animator>(); bossStats = GetComponent <BossStats>(); meleeDamage = bossStats.meleeDamage; iceSpikesScript = FindObjectOfType <IceSpikesBehaviour>(); if (iceSpikesScript == null) { iceSpikesScript3D = FindObjectOfType <IceSpikesBehaviour3D>(); if (iceSpikesScript3D == null) { Debug.LogError("Error: iceSpikesScript not found."); } } castingArea = GameObject.FindGameObjectWithTag("CastingArea"); earthAuraPS = earthAura.GetComponent <ParticleSystem>(); earthAuraPS.Stop(); ballAttackIndicatorPS = ballAttackIndicator.GetComponent <ParticleSystem>(); ballAttackIndicatorPS.Stop(); fireAura.GetComponent <SphereCollider>().enabled = false; fireAuraPS = fireAura.GetComponent <ParticleSystem>(); fireAuraPS.Stop(); fireAuraDamageScript = fireAura.GetComponent <FireAuraDamage>(); earthAuraDamageScript = earthAura.GetComponent <EarthAuraDamage>(); levitatingSkullsScript = levitatingSkulls.GetComponent <LevitatingSkullsBehaviour>(); bodyMesh = transform.Find("ModelContainer").gameObject; }