public override void AI() { AAAI.AIClaw(npc, ref npc.ai, true, false, 0.1f, 0.04f, 3f, 1.5f, 1f, 1f); if (npc.velocity.X > 0f) { npc.spriteDirection = 1; npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); } if (npc.velocity.X < 0f) { npc.spriteDirection = -1; npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X) + 3.14f; } npc.frameCounter++; if (npc.frameCounter >= 8) { npc.frameCounter = 0; npc.frame.Y += 26; if (npc.frame.Y > (26 * 4)) { npc.frameCounter = 0; npc.frame.Y = 0; } } }
public override void AI() { if (!NPC.AnyNPCs(ModContent.NPCType <GripOfChaosRed>()) && !NPC.AnyNPCs(ModContent.NPCType <GripOfChaosBlue>())) { npc.alpha += 10; if (npc.alpha > 255) { npc.active = false; } } AAAI.AIClaw(npc, ref npc.ai, true, false, 0.1f, 0.04f, 4f, 1.5f, 1f, 1f); }
public override void AI() { if (!NPC.AnyNPCs(mod.NPCType("GripOfChaosRed")) && !NPC.AnyNPCs(mod.NPCType("GripOfChaosBlue"))) { npc.alpha += 10; if (npc.alpha > 255) { npc.active = false; } } AAAI.AIClaw(npc, ref npc.ai, false, true, 0.1f, 0.04f, 5.5f, 2.5f, 1f, 1f); }