示例#1
0
 public WorldObject this[WorldID key] {
     get {
         WorldObject obj;
         if (TryGetValue(key, out obj) == false)
         {
             return(null);
         }
         return(obj);
     }
 }
示例#2
0
        public WorldObject(WorldID dbID, bool addToWorld)
        {
            mWorldID    = dbID;
            mAddToWorld = addToWorld;

            WorldID = WorldID.Dynamic(dbID.Type);
            if (mAddToWorld && Library.World.Objects[dbID] == null)
            {
                Library.World.Objects.Add(this);
            }
        }
示例#3
0
 public WorldObject(WorldID dbID)
     : this(dbID, false)
 {
 }
示例#4
0
 public bool Remove(WorldID key)
 {
     return(base.Remove(key.ID));
 }
示例#5
0
 public bool ContainsKey(WorldID key)
 {
     return(base.ContainsKey(key.ID));
 }
示例#6
0
 public void Add(WorldID key, WorldObject obj)
 {
     base.Add(key.ID, obj);
 }
示例#7
0
 public bool TryGetValue(WorldID key, out WorldObject obj)
 {
     return(base.TryGetValue(key.ID, out obj));
 }
示例#8
0
 public WorldObjectUnit(WorldID dbID, bool addToWorld)
     : base(dbID, addToWorld)
 {
 }