public override void Start() { base.Start(); if (null != Entity.aliveEntity) { Entity.aliveEntity.deathEvent += OnDeath; } m_MotionMgr = Entity.motionMgr; if (null != m_MotionMgr) { m_Sleep = new Action_Sleep(); m_Gather = new Action_Gather(); m_MotionMgr.AddAction(m_Sleep); m_MotionMgr.AddAction(new Action_Eat()); m_MotionMgr.AddAction(m_Gather); m_MotionMgr.AddAction(new Action_PickUpItem()); m_MotionMgr.AddAction(new Action_Sit()); m_MotionMgr.AddAction(new Action_Stuned()); m_MotionMgr.AddAction(new Action_Build()); m_MotionMgr.AddAction(new Action_Operation()); m_MotionMgr.AddAction(new Action_Lie()); m_MotionMgr.AddAction(new Action_Cutscene()); m_MotionMgr.AddAction(new Action_Cure()); m_MotionMgr.AddAction(new Action_Leisure()); m_MotionMgr.AddAction(new Action_Abnormal()); m_MotionMgr.AddAction(m_Hand); m_MotionMgr.AddAction(m_Handed); } }
public void InitSleepInfo(NpcCmpt npc) { if (mSleepAction == null) { mSleepAction = Entity.motionMgr.GetAction <Action_Sleep>(); } if (mSleepAction != null) { mSleepAction.startSleepEvt += npc.OnLeaderSleep; mSleepAction.endSleepEvt += npc.OnLeaderEndSleep; } }