public static INPC WithNextAttackFrame(this INPC npc) { if (npc.Frame == NPCFrame.Attack2) { return(npc.WithFrame(NPCFrame.Standing)); } if (npc.Frame == NPCFrame.Standing) { return(npc.WithFrame(NPCFrame.Attack1)); } return(npc.WithFrame(npc.Frame + 1)); }
public static INPC WithNextWalkFrame(this INPC npc) { if (npc.Frame == NPCFrame.WalkFrame4) { return(npc.WithFrame(NPCFrame.Standing)); } if (npc.Frame == NPCFrame.Standing) { return(npc.WithFrame(NPCFrame.WalkFrame1)); } return(npc.WithFrame(npc.Frame + 1)); }