static int _m_React(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); xc.Machine __cl_gen_to_be_invoked = (xc.Machine)translator.FastGetCSObj(L, 1); try { { uint fsmEvent = LuaAPI.xlua_touint(L, 2); object[] param = translator.GetParams <object>(L, 3); bool __cl_gen_ret = __cl_gen_to_be_invoked.React(fsmEvent, param); LuaAPI.lua_pushboolean(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
//----------------------------------------------- // 受击类型触发事件 //----------------------------------------------- /// <summary> /// 根据伤害信息来切换受击状态 /// </summary> public void BeattackState(Damage dam) { // 只有的Idle或受击状态下才能切换受击状态(受击状态的优先级最低) @rr 2016.10.9 // 在交互过程中要判断是否能被受击打断 if (!IsIdle() && !IsBeattacking && (!IsInInteraction || !mOwner.CanBeInterruptedWhenInInteractionAndBeAttacked)) { return; } // 晕眩等情况下不受击 if (mOwner.HasBattleState(BattleStatusType.BATTLE_STATUS_TYPE_SBeattackMotionDisable)) { return; } InitFalseHitBack(dam); Vector3 dir = Vector3.zero; switch (dam.BeattackState) { case Damage.EBeattackState.BS_BendBack: { MoveSpeed = 0; Stop(); BeattackBendback(); if (!mOwner.IsFreezeState) { mOwner.UnFreeze(); } mMachine.React((uint)ActorMachine.EFSMEvent.DE_BeAtkBackward); } break; default: mMachine.React((uint)ActorMachine.EFSMEvent.DS_BeAtkNormal); break; } }