Exemple #1
0
 public NpcGroup(MmoWorld world, NpcGroupData npcGroupData)
 {
     this.npcGroupData  = npcGroupData;
     this.npcCounter    = 0;
     this.lastSpawnTime = 0f;
     this.world         = world;
 }
Exemple #2
0
 public bool TryGet(string name, out MmoWorld world)
 {
     //using(ReadLock.TryEnter(this.readWriteLock, Settings.MaxLockWaitTimeMilliseconds))
     //{
     return(this.dict.TryGetValue(name, out world));
     //}
 }
Exemple #3
0
 public bool TryCreate(string name, Vector minCorner, Vector maxCorner, Vector tileDimensions, out MmoWorld world, Res resource)
 {
     //using(WriteLock.TryEnter(this.readWriteLock, Settings.MaxLockWaitTimeMilliseconds))
     //{
     if (this.dict.TryGetValue(name, out world))
     {
         return(false);
     }
     world = new MmoWorld(name, minCorner, maxCorner, tileDimensions, resource, m_App);
     //world.LoadXml();
     if (this.dict.TryAdd(name, world))
     {
         return(true);
     }
     return(false);
     //}
 }