예제 #1
0
        public void DumpAllGameEventDescriptors()
        {
            GameEventDescriptor[] gameEventDescriptors = new GameEventDescriptor[m_GameEventDescriptors.Count];

            m_GameEventDescriptors.Values.CopyTo(gameEventDescriptors, 0);

            Utilities.DumpGameEventDescriptors(new List<GameEventDescriptor>(gameEventDescriptors), "AllGameEventDescriptors.txt", true);
        }
        public void GameEvent(GameEvent gameEvent, GameEventDescriptor gameEventDescriptor)
        {
            for (int i = 0; i < this.m_Values.Count; i++)
            {
                GameObserver gameObserver = this.m_Values[i];

                gameObserver.GameEvent(gameEvent, gameEventDescriptor);
            }
        }
예제 #3
0
        public GameEventList(byte[] gameEventListData)
        {
            this.Descriptors = new List<GameEventDescriptor>();

            ProtoMessage protoMessage = new ProtoMessage(gameEventListData);

            List<object> values;

            if (protoMessage.Values.TryGetValue("1", out values))
            {
                for (int i = 0; i < values.Count; i++)
                {
                    byte[] gameEventListDescriptorData = (byte[])values[i];

                    GameEventDescriptor gameEventDescriptor = new GameEventDescriptor(gameEventListDescriptorData);

                    this.Descriptors.Add(gameEventDescriptor);
                }
            }
        }
예제 #4
0
 public void Add(GameEventDescriptor gameEventDescriptor)
 {
     m_GameEventDescriptors.Add(gameEventDescriptor.ID, gameEventDescriptor);
 }