public void playAnimationRPG(GameAnimationType type, GameAnimationDirection dir, OnEventOver over) { animationType = type; animationDirection = dir; int index = 0; int size = safHead.count3[(int)type]; switch (type) { case GameAnimationType.Stand: { index += (int)dir * size; startFrame = index; endFrame = index + size; loop = true; } break; case GameAnimationType.Move: { index += safHead.count3[(int)GameAnimationType.Stand] * 4; index += (int)dir * size; startFrame = index; endFrame = index + size; loop = true; } break; default: break; } if (size == 0) { start = false; if (over != null) { over(); } } else { frame = startFrame; updateFrame(frame); onEventOver = over; start = true; } }
public void playAnimationBattle(GameAnimationType type, GameAnimationDirection dir, OnEventOver over) { gameAnimation.playAnimationBattle(type, dir, over); }