Ejemplo n.º 1
0
        public override void AI()
        {
            timer++;
            if (state == 0 && npc.life < npc.lifeMax / 2)
            {
                states[(counter + 1) % states.Length] = 5;
                npc.Approach(TPlayer.Center, 0.5f);
                npc.velocity *= 2;
                Explode.DustExplodeEasy(npc.Center, 100, 30, 197, 1, 100, Color.White, 3f);
                state++;
            }
            switch (states[counter])
            {
            case 0: State0(); break;

            case 1: State1(); break;

            case 2: State2(); break;

            case 3: State3(); break;

            case 4: State4(); break;

            case 5: State5(); break;
            }
            npc.rotation = npc.velocity.ToRotation() + 1.57f;
        }