// ***********************************************************************
// Assembly : Game
// Author : Kimch
// Created : 2020-09-02
// Description :
// Last Modified By :
// Last Modified On :
// ***********************************************************************
//
//
// ***********************************************************************
using System.Collections.Generic;
using UnityEngine;
namespace G
{
///
///
///
public class Stat_ReviveAction : Stat_BaseAction
{
private bool end;
public Stat_ReviveAction(Stat_StateManager statMgr)
: base(statMgr)
{
}
public override bool Enter(Dictionary param, bool clearDelegates = false)
{
base.Enter(param, clearDelegates);
m_char.StopAnimation();
Vector3 curPos = (Vector3)param["pos"];
m_char.position = (curPos);
string aniName = (string)param["aniName"];
//m_curAniLength = m_char.PlayAnimation(aniName);
if (m_curAniLength == -1f)
{
return false;
}
m_statMgr.AddTimer(m_curAniLength, AnimationEnd_CB);
m_char.SetColliderEnabled(true);
end = false;
return true;
}
public override bool CanTransition(enStat stat)
{
if (stat == enStat.STAT_ACTION_DEAD)
{
return true;
}
//if (MonoInstancePool.getInstance().curGuideModule == 0)
//{
// return true;
//}
if (!end)
{
return false;
}
return true;
}
protected virtual bool AnimationEnd_CB(object[] param)
{
end = true;
return SetCurActionState(enStat.STAT_ACTION_IDLE);
}
}
}