public NpcGroup(MmoWorld world, NpcGroupData npcGroupData) { this.npcGroupData = npcGroupData; this.npcCounter = 0; this.lastSpawnTime = 0f; this.world = world; }
public bool TryGet(string name, out MmoWorld world) { //using(ReadLock.TryEnter(this.readWriteLock, Settings.MaxLockWaitTimeMilliseconds)) //{ return(this.dict.TryGetValue(name, out world)); //} }
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); //} }