Exemple #1
0
        void PushDestroyEntity(SyncSession session, int entityID)
        {
            DestroyEntityMsg msg = new DestroyEntityMsg();

            msg.id    = entityID;
            msg.frame = m_world.FrameCount;

            session.SendMsg(msg);

            Debug.Log("PushDestroyEntity 3");
        }
        void PushDestroyEntity(SyncSession session, int entityID)
        {
            DestroyEntityMsg msg = new DestroyEntityMsg();

            msg.id    = entityID;
            msg.frame = m_world.FrameCount;

            ProtocolAnalysisService.SendMsg(session, msg);

            Debug.Log("PushDestroyEntity 3");
        }
        void PushDestroyEntity(SyncSession session, int entityID)
        {
            FrameCountComponent fc  = m_world.GetSingletonComp <FrameCountComponent>();
            DestroyEntityMsg    msg = new DestroyEntityMsg();

            msg.id    = entityID;
            msg.frame = fc.count;

            session.SendMsg(msg);

            Debug.Log("PushDestroyEntity 3");
        }
Exemple #4
0
    void ReceviceDestroyEntityMsg(DestroyEntityMsg msg, params object[] objs)
    {
        Debug.Log("ReceviceDestroyEntityMsg");

        ServerCacheComponent rc = m_world.GetSingletonComp <ServerCacheComponent>();

        ServiceMessageInfo info = new ServiceMessageInfo();

        info.m_frame = msg.frame;
        info.m_type  = MessageType.DestroyEntity;
        info.m_msg   = msg;

        rc.m_messageList.Add(info);

        Recalc(msg.frame);
    }
Exemple #5
0
 void ExecuteDestroyEntityMsg(DestroyEntityMsg msg)
 {
     m_world.DestroyEntity(msg.id);
 }