示例#1
0
 public Boolean AddGameObject(GameObject obj)
 {
     if (obj != null )//&& !addList.Contains(obj) && !gameObjects.Contains(obj))
     {
         addList.Add(obj);
         return true;
     }
     return false;
 }
        public GameObjectUpdate(GameTime currentGameTime, GameObject obj)
            : base(currentGameTime)
        {
            int typeID = GameObjectTypes.GetTypeID(obj.GetType());
            this.Append(typeID);
            this.Append(obj.ID);
            this.Append(obj.IsDestroyed);

            foreach (GameObjectField field in obj.Fields)
            {
                field.ConstructMessage(this);
            }
        }
 public GameObjectField(GameObject obj)
 {
     obj.Fields.Add(this);
 }
示例#4
0
 public void RemoveGameObject(GameObject obj)
 {
     if (obj != null && !removeList.Contains(obj) && gameObjects.Contains(obj))
     {
         removeList.Add(obj);
     }
 }