41 lines
1.4 KiB
C#
41 lines
1.4 KiB
C#
using UnityEngine;
|
|
|
|
namespace Code.OfficeGame.BattleMode.Actions
|
|
{
|
|
public class StuggerActionData : BattleActionData
|
|
{
|
|
public int CurrentFrame;
|
|
public int TransitionFrames;
|
|
|
|
public Vector3 KnockbackDirection;
|
|
public float KnockbackSpeed;
|
|
public float KnockbackDistance;
|
|
|
|
public override BattleActionData GetSnapshot()
|
|
{
|
|
return new StuggerActionData
|
|
{
|
|
TotalFrames = TotalFrames,
|
|
Finished = Finished,
|
|
CurrentFrame = CurrentFrame,
|
|
TransitionFrames = TransitionFrames,
|
|
KnockbackDirection = KnockbackDirection,
|
|
KnockbackSpeed = KnockbackSpeed,
|
|
KnockbackDistance = KnockbackDistance
|
|
};
|
|
}
|
|
|
|
public override void RestoreSnapshot(BattleActionData snapshot)
|
|
{
|
|
if (snapshot is not StuggerActionData neededSnapshot) return;
|
|
|
|
TotalFrames = neededSnapshot.TotalFrames;
|
|
Finished = neededSnapshot.Finished;
|
|
CurrentFrame = neededSnapshot.CurrentFrame;
|
|
TransitionFrames = neededSnapshot.TransitionFrames;
|
|
KnockbackDirection = neededSnapshot.KnockbackDirection;
|
|
KnockbackSpeed = neededSnapshot.KnockbackSpeed;
|
|
KnockbackDistance = neededSnapshot.KnockbackDistance;
|
|
}
|
|
}
|
|
} |