94 lines
2.8 KiB
C#
94 lines
2.8 KiB
C#
![]() |
// ***********************************************************************
|
|||
|
// Assembly : Game
|
|||
|
// Author : Kimch
|
|||
|
// Created : 2020-09-02
|
|||
|
// Description :
|
|||
|
// Last Modified By :
|
|||
|
// Last Modified On :
|
|||
|
// ***********************************************************************
|
|||
|
// <copyright file= "Stat_IdleAction" company="Kimch"></copyright>
|
|||
|
// <summary></summary>
|
|||
|
// ***********************************************************************
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
namespace G
|
|||
|
{
|
|||
|
|
|||
|
public class Stat_AngerAction : Stat_Base
|
|||
|
{
|
|||
|
private Timer m_time;
|
|||
|
|
|||
|
#pragma warning disable CS0649 // 从未对字段“Stat_AngerAction.m_curAniLength”赋值,字段将一直保持其默认值 0
|
|||
|
private float m_curAniLength;
|
|||
|
#pragma warning restore CS0649 // 从未对字段“Stat_AngerAction.m_curAniLength”赋值,字段将一直保持其默认值 0
|
|||
|
|
|||
|
private bool m_end;
|
|||
|
|
|||
|
public Stat_AngerAction(Stat_StateManager statMgr)
|
|||
|
: base(statMgr)
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
public override bool Enter(Dictionary<string, object> param, bool clearDelegates = false)
|
|||
|
{
|
|||
|
m_end = false;
|
|||
|
m_char.GetComponent<Rigidbody>().mass = 200f;
|
|||
|
m_char.GetComponent<Rigidbody>().drag = 200f;
|
|||
|
//m_char.m_animation.Stop();
|
|||
|
bool flag = false;
|
|||
|
flag = base.Enter(param, clearDelegates);
|
|||
|
//m_curAniLength = m_char.PlayAnimation("skill03");
|
|||
|
//if (m_curAniLength == -1f)
|
|||
|
//{
|
|||
|
// Debug.LogError("Can not find AniName:skill03");
|
|||
|
// return false;
|
|||
|
//}
|
|||
|
//((EntityPlayer)m_char).m_camScript.ZoomIn(20, 16, 0.3f);
|
|||
|
//if (LevelFlowCtrl.instance.canUseTimeScale)
|
|||
|
//{
|
|||
|
// GameCtrl.SetTimeScale(0.25f);
|
|||
|
//}
|
|||
|
m_statMgr.AddTimer(m_curAniLength, AnimationEnd_CB);
|
|||
|
m_time = m_statMgr.AddTimer(0.25f, FireFx_CB);
|
|||
|
return flag;
|
|||
|
}
|
|||
|
|
|||
|
private bool FireFx_CB(object[] param)
|
|||
|
{
|
|||
|
//GameCtrl.RecoverTimeScale();
|
|||
|
//((EntityPlayer)m_char).m_superFx = PrefabManager.Instance().Spawn("kuangbao", m_char.GetCurPos(), Quaternion.identity);
|
|||
|
//((EntityPlayer)m_char).m_superFx.GetComponent<Ef_base>().m_user = m_char.transform;
|
|||
|
//((EntityPlayer)m_char).HideShadow();
|
|||
|
//m_char.AddBuffByID(450041, null, null, 1, m_char);
|
|||
|
//m_char.AddBuffByID(450042, null, null, 1, m_char);
|
|||
|
m_char.UpdateAttackSpeed();
|
|||
|
return false;
|
|||
|
}
|
|||
|
|
|||
|
public override bool CanTransition(enStat stat)
|
|||
|
{
|
|||
|
if (stat == enStat.STAT_ACTION_DEAD)
|
|||
|
{
|
|||
|
return true;
|
|||
|
}
|
|||
|
if (m_end)
|
|||
|
{
|
|||
|
return true;
|
|||
|
}
|
|||
|
return false;
|
|||
|
}
|
|||
|
|
|||
|
private bool AnimationEnd_CB(object[] param)
|
|||
|
{
|
|||
|
//int curGuideModule = MonoInstancePool.getInstance<GuideLocalData>().curGuideModule;
|
|||
|
//if (curGuideModule == 1 && MonoInstancePool.getInstance<GuideLocalData>().curGuideModuleStep == 5)
|
|||
|
//{
|
|||
|
// GuideManager._instance.getCurEvent()?.next();
|
|||
|
//}
|
|||
|
m_end = true;
|
|||
|
m_char.ResetRigidBody();
|
|||
|
return SetCurActionState(enStat.STAT_ACTION_MOVE);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|