namespace Code.OfficeGame.BattleMode.Actions { public class StuggerActionData : BattleActionData { public int CurrentFrame; public override BattleActionData GetSnapshot() { var snapshot = new AttackBattleActionData() { TotalFrames = TotalFrames, CurrentFrame = CurrentFrame }; return snapshot; } public override void RestoreSnapshot(BattleActionData snapshot) { if (snapshot is not AttackBattleActionData neededSnapshot) return; TotalFrames = neededSnapshot.TotalFrames; CurrentFrame = neededSnapshot.CurrentFrame; } } }