示例#1
0
    // Use this for initialization
    void Start()
    {
        player = GameObject.FindGameObjectWithTag("Player").transform;
        nav    = GetComponent <NavMeshAgent>();
        health = GetComponent <EnemyHealth>();

        currentState = BossStand.Instance();

        hellephantAi = GetComponent <HellephantAI>();
        eq_Range     = Resources.Load("Prefabs/Skill/BossSkill/EQ_Range") as GameObject;
        eq_Particle  = Resources.Load("Prefabs/Skill/BossSkill/EQ_Particle") as GameObject;
        r_Range      = Resources.Load("Prefabs/Skill/BossSkill/Rush_Range") as GameObject;
        r_Particle   = Resources.Load("Prefabs/Skill/BossSkill/Rush_Particle") as GameObject;

        skillTimer  = new float[4];
        skillActive = new bool[4] {
            true, true, true, true
        };
        active = 2;
    }
示例#2
0
    override public void Execute(EnemyAI enemyAi)
    {
        HellephantAI helle = enemyAi as HellephantAI;

        helle.Skill_EarthQuake();

        switch (helle.Active())
        {
        case 0:
            break;

        case 1:
            helle.ChangeState(BossRush.Instance());
            break;

        case 2:
            helle.ChangeState(BossTrace.Instance());
            break;

        default:
            break;
        }
    }