Example #1
0
        public void Execute(int actor_id)
        {
            if (!WorldSystem.Instance.IsPureClientScene())
            {
                return;
            }
            SharedGameObjectInfo share_info = LogicSystem.GetSharedGameObjectInfo(actor_id);

            if (share_info == null)
            {
                return;
            }
            Vector3 actor_pos = new Vector3(share_info.X, share_info.Y, share_info.Z);
            Vector3 assit_pos = CaclEndPos(actor_pos);

            UnityEngine.Vector3 end_pos = new UnityEngine.Vector3(assit_pos.X, assit_pos.Y, assit_pos.Z);
            bool ret = IsFadeIn(end_pos);

            if (ret)
            {
                TriggerLogic(share_info.LinkId);
            }
            else
            {
                m_CurNpcActorId = share_info.m_ActorId;
                LogicSystem.SendStoryMessage("playermovetopos", end_pos.x, end_pos.y, end_pos.z);
            }
        }
Example #2
0
 public void Tick()
 {
     if (m_CurNpcActorId > 0)
     {
         SharedGameObjectInfo share_info = LogicSystem.GetSharedGameObjectInfo(m_CurNpcActorId);
         if (share_info != null)
         {
             ArkCrossEngine.Vector3 actor_pos = new ArkCrossEngine.Vector3(share_info.X, share_info.Y, share_info.Z);
             ArkCrossEngine.Vector3 assit_pos = CaclEndPos(actor_pos);
             UnityEngine.Vector3    end_pos   = new UnityEngine.Vector3(assit_pos.X, assit_pos.Y, assit_pos.Z);
             bool ret = IsFadeIn(end_pos);
             if (ret)
             {
                 m_CurNpcActorId = 0;
                 TriggerLogic(share_info.LinkId);
             }
         }
     }
 }