using UnityEngine;
|
using System.Collections.Generic;
|
|
public class DeathRecordAction : RecordAction
|
{
|
|
public DeathRecordAction(BattleField _battleField, BattleObject _battleObj)
|
: base(RecordActionType.Death, _battleField, _battleObj)
|
{
|
isFinish = false;
|
}
|
|
public override bool IsFinished()
|
{
|
return isFinish;
|
}
|
|
|
public override void Run()
|
{
|
base.Run();
|
isFinish = true;
|
battleObject.OnDeath(OnDeathAnimationEnd);
|
}
|
|
private void OnDeathAnimationEnd()
|
{
|
// 只有主线掉落物品
|
if (battleField.MapID == 1 || battleField.MapID == 2)
|
{
|
battleObject.PerformDrop();
|
}
|
// 掉落物品 增加经验
|
|
isFinish = true;
|
}
|
}
|