void OnActionStart(PEActionType actionType) { if (actionType == PEActionType.Fell) { PeCamera.fpCameraCanRotate = false; } }
void OnActionEnd(PEActionType actionType) { if (actionType == PEActionType.Fell) { PeCamera.fpCameraCanRotate = true; } }
public void EndAction(PEActionType type) { if (m_Motion != null) { m_Motion.EndAction(type); } }
public void DoActionImmediately(PEActionType type, PEActionParam para = null) { if (HasAction(type)) { if (IsActionRunning(type)) { m_ActionDic[(int)type].ResetAction(para); } else { if (null != m_SkEntity._net) { ((SkNetworkInterface)m_SkEntity._net).SendDoAction(type, para); } ActionRelationData data = ActionRelationData.GetData(type); if (null != onActionStart) { onActionStart(type); } RunningAction runningAction = GetRunningAction(); runningAction.Do(m_ActionDic[(int)type], data, para, true); m_RunningAction[(int)type] = runningAction; } } }
public void OnActionEnd(PEActionType type) { if (null != onActionEnd) { onActionEnd(type); } }
public void RemoveAction(PEActionType type) { if (HasAction(type)) { EndImmediately(type); m_ActionDic[(int)type] = null; } }
public bool DoAction(PEActionType type, PEActionParam para) { if (m_Motion != null) { return(m_Motion.DoAction(type, para)); } return(false); }
private void RPC_SKDANO(uLink.BitStream stream, uLink.NetworkMessageInfo info) { PEActionType proType = stream.Read <PEActionType> (); if (MtCmpt != null) { MtCmpt.DoActionImmediately((PEActionType)proType); } }
public static ActionRelationData GetData(PEActionType type) { if (null == m_Relations) { Debug.LogError("ActionRelationData not init"); return(null); } return(m_Relations[(int)type]); }
public void ContinueAction(PEActionType beType, PEActionType tryPauseType) { if (HasAction(beType)) { m_ActionDic[(int)beType].m_PauseActions.Remove(tryPauseType); if (IsActionRunning(beType) && !m_ActionDic[(int)beType].pauseAction) { m_ActionDic[(int)beType].ContinueAction(); } } }
private void RPC_SKDAN(uLink.BitStream stream, uLink.NetworkMessageInfo info) { PEActionType proType = stream.Read <PEActionType> (); PEActionParamN param = PEActionParamN.param; param.n = stream.Read <int> (); if (MtCmpt != null) { MtCmpt.DoActionImmediately((PEActionType)proType, param); } }
public void SendDoAction(PEActionType type, PEActionParam obj) { if (!hasOwnerAuth) { return; } if (SendActionEvent.ContainsKey(type)) { SendActionEvent [type] (type, obj); } }
public void SendEndImmediately(PEActionType type) { if (!hasOwnerAuth) { return; } if (SendActionEvent.ContainsKey(type)) { RPCServer(EPacketType.PT_InGame_SKDAEndImmediately, type); } }
void OnActionEnd(PEActionType type) { if (null != Weapon) { PEHoldAbleEquipment equipment = m_Weapon as PEHoldAbleEquipment; if (null != equipment && equipment.m_HandChangeAttr.m_ActiveActionType == type) { m_Weapon = null; m_WeaponID = -1; } } }
private void RPC_SKDAVQ(uLink.BitStream stream, uLink.NetworkMessageInfo info) { PEActionType proType = stream.Read <PEActionType> (); PEActionParamVQ param = PEActionParamVQ.param; param.vec = stream.Read <Vector3> (); param.q = stream.Read <Quaternion> (); if (MtCmpt != null) { MtCmpt.DoActionImmediately((PEActionType)proType, param); } }
private void RPC_SKDAVVF(uLink.BitStream stream, uLink.NetworkMessageInfo info) { PEActionType proType = stream.Read <PEActionType> (); PEActionParamVVF param = PEActionParamVVF.param; param.vec1 = stream.Read <Vector3> (); param.vec2 = stream.Read <Vector3> (); param.f = stream.Read <float> (); if (MtCmpt != null) { MtCmpt.DoActionImmediately((PEActionType)proType, param); } }
public void PauseAction(PEActionType beType, PEActionType tryPauseType) { if (HasAction(beType)) { if (IsActionRunning(beType) && !m_ActionDic[(int)beType].pauseAction) { m_ActionDic[(int)beType].PauseAction(); } if (!m_ActionDic[(int)beType].m_PauseActions.Contains(tryPauseType)) { m_ActionDic[(int)beType].m_PauseActions.Add(tryPauseType); } } }
public bool EndAction(PEActionType type) { if (IsActionRunning(type)) { m_ActionDic[(int)type].EndAction(); //send stop action if (null != m_SkEntity._net && type != PEActionType.Wentfly && type != PEActionType.Knocked) { ((SkNetworkInterface)m_SkEntity._net).SendEndAction(type); } return(true); } return(false); }
public bool CanDoAction(PEActionType type, PEActionParam para = null) { if (HasAction(type)) { if (IsActionRunning(type)) { return(true); } else if (m_ActionDic[(int)type].CanDoAction(para)) { ActionRelationData data = ActionRelationData.GetData(type); return(CheckDepend(data)); } } return(false); }
public bool EndImmediately(PEActionType type) { if (IsActionRunning(type)) { m_RunningActionPool.Push(m_RunningAction[(int)type]); m_RunningAction[(int)type].EndAction(); m_RunningAction[(int)type] = null; //send stop action if (null != m_SkEntity._net && type != PEActionType.Wentfly && type != PEActionType.Knocked) { ((SkNetworkInterface)m_SkEntity._net).SendEndImmediately(type); } OnActionEnd(type); return(true); } return(false); }
public bool DoAction(PEActionType type, PEActionParam para = null) { if (HasAction(type)) { if (IsActionRunning(type)) { // if(null != m_SkEntity._net) // ((SkNetworkInterface)m_SkEntity._net).SendDoAction(type,para); m_ActionDic[(int)type].ResetAction(para); return(true); } else if (m_ActionDic[(int)type].CanDoAction(para)) { ActionRelationData data = ActionRelationData.GetData(type); if (null == data) { return(false); } if (CheckDepend(data)) { if (null != m_SkEntity._net) { ((SkNetworkInterface)m_SkEntity._net).SendDoAction(type, para); } if (null != onActionStart) { onActionStart(type); } RunningAction runningAction = GetRunningAction(); runningAction.Do(m_ActionDic[(int)type], data, para, false); m_RunningAction[(int)type] = runningAction; #if UNITY_EDITOR if (ShowLog) { Debug.LogError("DoAction: " + type.ToString()); } #endif return(true); } } } return(false); }
private void RPC_SKDAVQSNS(uLink.BitStream stream, uLink.NetworkMessageInfo info) { PEActionType proType = stream.Read <PEActionType>(); PEActionParamVQSNS param = PEActionParamVQSNS.param; param.vec = stream.Read <Vector3>(); param.q = stream.Read <Quaternion>(); param.strAnima = stream.Read <string>(); param.enitytID = stream.Read <int>(); param.boneStr = stream.Read <string>(); PeEntity player = EntityMgr.Instance.Get(Id); //2017.02.17 我可以看见这个玩家的时候再执行行为 if (null != player && player.hasView) { if (MtCmpt != null) { MtCmpt.DoActionImmediately((PEActionType)proType, param); } } }
private void SendSKDATwoHandSwordPutOff(PEActionType type, PEActionParam obj) { RPCServer(EPacketType.PT_InGame_SKDANO, type); }
private void SendSKDAOperation(PEActionType type, PEActionParam obj) { PEActionParamVQS param = obj as PEActionParamVQS; RPCServer(EPacketType.PT_InGame_SKDAVQS, type, param.vec, param.q, param.str); }
private void SendSKDASit(PEActionType type, PEActionParam obj) { PEActionParamVQSN param = obj as PEActionParamVQSN; RPCServer(EPacketType.PT_InGame_SKDAVQSN, type, param.vec, param.q, param.str, param.n); }
private void SendSKDATwoHandSwordAttack(PEActionType type, PEActionParam obj) { PEActionParamVVNN param = obj as PEActionParamVVNN; RPCServer(EPacketType.PT_InGame_SKDAVVNN, type, param.vec1, param.vec2, param.n1, param.n2); }
private void SendSKDARide(PEActionType type, PEActionParam obj) { PEActionParamVQSNS paramVQSNS = obj as PEActionParamVQSNS; RPCServer(EPacketType.PT_InGame_SKDAVQSNS, type, paramVQSNS.vec, paramVQSNS.q, paramVQSNS.strAnima, paramVQSNS.enitytID, paramVQSNS.boneStr); }
private void SendSKDAAlienDeath(PEActionType type, PEActionParam obj) { RPCServer(EPacketType.PT_InGame_SKDANO, type); }
private void SendSKDATalk(PEActionType type, PEActionParam obj) { PEActionParamS param = obj as PEActionParamS; RPCServer(EPacketType.PT_InGame_SKDAS, type, param.str); }
private void SendSKDACure(PEActionType type, PEActionParam obj) { PEActionParamVFVFS param = obj as PEActionParamVFVFS; RPCServer(EPacketType.PT_InGame_SKDAVFVFS, type, param.vec1, param.f1, param.vec2, param.f2, param.str); }