Пример #1
0
 public void RemoveEntity(int id)
 {
     m_entities[id].MarkForRemoval();
     m_entitiesChangedFlags |= EntitiesChangedFlags.Removed;
     m_dirtyEntities.Add(id);
     FightLogicExecutor.NotifyEntityRemoved(fightId);
 }
Пример #2
0
 public bool TryRemoveEntity(int id)
 {
     if (m_entities.TryGetValue(id, out EntityStatus value))
     {
         value.MarkForRemoval();
         m_entitiesChangedFlags |= EntitiesChangedFlags.Removed;
         m_dirtyEntities.Add(id);
         FightLogicExecutor.NotifyEntityRemoved(fightId);
         return(true);
     }
     return(false);
 }
Пример #3
0
        private void OnFightEventsEvent(FightEventsEvent obj)
        {
            m_fightEventBuffer.Clear();
            RepeatedField <FightEventData> events = obj.Events;
            int count = events.get_Count();

            for (int i = 0; i < count; i++)
            {
                FightEventData proto = events.get_Item(i);
                m_fightEventBuffer.Add(FightEventFactory.FromProto(proto));
            }
            FightLogicExecutor.ProcessFightEvents(obj.FightId, m_fightEventBuffer);
        }