示例#1
0
 // Use this for initialization
 void Start()
 {
     iceSpikesScript = transform.parent.GetComponent <IceSpikesBehaviour>();
     if (iceSpikesScript == null)
     {
         Debug.LogError("Error: iceSpikesScript not found.");
     }
 }
示例#2
0
    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;
    }