using UnityEngine;
|
using System.Collections.Generic;
|
|
public class DeathRecordAction : RecordAction
|
{
|
|
public DeathRecordAction(BattleField _battleField, BattleObject _battleObj)
|
: base(RecordActionType.Death, _battleField, _battleObj)
|
{
|
isFinish = false;
|
isRunOnce = false;
|
}
|
|
public override bool IsFinished()
|
{
|
return isFinish;
|
}
|
|
|
public override void Run()
|
{
|
if (isRunOnce)
|
{
|
return;
|
}
|
base.Run();
|
isRunOnce = true;
|
battleObject.OnDeath(OnDeathAnimationEnd);
|
}
|
|
private void OnDeathAnimationEnd()
|
{
|
isFinish = true;
|
}
|
}
|