public void Reset() { modelController = PEUtil.GetCmpt <PEModelController>(transform); ragdollController = PEUtil.GetCmpt <PERagdollController>(transform); ikArray = PEUtil.GetCmpts <IK>(transform); ikFlashLight = PEUtil.GetCmpt <IKFlashLight>(transform); fbbik = PEUtil.GetCmpt <FullBodyBipedIK>(transform); grounderFBBIK = PEUtil.GetCmpt <GrounderFBBIK>(transform); humanPhyCtrl = PEUtil.GetCmpt <HumanPhyCtrl>(transform); ikAimCtrl = PEUtil.GetCmpt <IKAimCtrl>(transform); ikAnimEffectCtrl = PEUtil.GetCmpt <IKAnimEffectCtrl>(transform); ikDrive = PEUtil.GetCmpt <IKDrive>(transform); defenceTrigger = PEUtil.GetCmpt <PEDefenceTrigger>(transform); pathFinder = PEUtil.GetCmpt <PEPathfinder>(transform); motor = PEUtil.GetCmpt <PEMotor>(transform); steerAgent = PEUtil.GetCmpt <Steer3D.SteerAgent>(transform); animFollow_AF = PEUtil.GetCmpt <AnimFollow_AF>(transform); beatParam = PEUtil.GetCmpt <BeatParam>(transform); moveParam = PEUtil.GetCmpt <MoveParam>(transform); barrelController = PEUtil.GetCmpt <PEBarrelController>(transform); billBoard = PEUtil.GetCmpt <BillBoard>(transform); armorBones = PEUtil.GetCmpt <ArmorBones>(transform); visions = PEUtil.GetCmpts <PEVision>(transform); hears = PEUtil.GetCmpts <PEHearing>(transform); native = PEUtil.GetCmpt <PENative>(transform); monster = PEUtil.GetCmpt <PEMonster>(transform); if (null != modelController) { modelController.ResetModelInfo(); } if (null != animFollow_AF) { animFollow_AF.ResetModelInfo(); } if (null != ragdollController) { ragdollController.ResetRagdoll(); } }
public void OnMsg(EMsg msg, params object[] args) { switch (msg) { case EMsg.View_Prefab_Build: BiologyViewRoot viewRoot = args[1] as BiologyViewRoot; m_Motor = viewRoot.motor; m_Steer = viewRoot.steerAgent; m_Path = viewRoot.pathFinder; m_Param = viewRoot.beatParam; InitParam(); if (m_Motor is PEMotorPhysics) { (m_Motor as PEMotorPhysics).Init(Entity); } m_LastMoveTime = Time.time; break; case EMsg.Net_Controller: m_Proxy = false; break; case EMsg.Net_Proxy: m_Proxy = true; break; case EMsg.State_Die: if (m_Motor != null) { m_Motor.Reset(); } enabled = false; break; case EMsg.State_Revive: enabled = true; break; } }
public void OnMsg(EMsg msg, params object[] args) { switch (msg) { case EMsg.View_Prefab_Build: BiologyViewRoot viewRoot = args[1] as BiologyViewRoot; m_Param = viewRoot.beatParam; m_PhyCtrl = viewRoot.humanPhyCtrl; m_IKAnimCtrl = viewRoot.ikAnimEffectCtrl; m_Repulsed.phyCtrl = m_PhyCtrl; m_Wentfly.phyCtrl = m_PhyCtrl; m_Knocked.phyCtrl = m_PhyCtrl; m_Repulsed.m_Param = m_Param; break; // case EMsg.View_Ragdoll_Getup_Finished: // if(null != m_Wentfly && m_MotionMgr.IsActionRunning(m_Wentfly.ActionType)) // m_MotionMgr.EndImmediately(m_Wentfly.ActionType); // m_MotionMgr.EndImmediately(m_Revive.ActionType); // m_MotionMgr.EndImmediately(m_GetUp.ActionType); // m_MotionMgr.EndImmediately(m_Knocked.ActionType); // break; case EMsg.View_Ragdoll_Fall_Finished: if (null != m_PhyCtrl) { m_PhyCtrl.grounded = true; } break; case EMsg.Battle_AttackHit: if (null != onHitTarget) { PeEntity hitEntity = ((PECapsuleHitResult)args[0]).hitTrans.GetComponentInParent <PeEntity>(); onHitTarget(hitEntity); } break; } }