示例#1
0
 public Gamemap(Room room)
 {
     this.room = room;
     this.DiagonalEnabled = true;
     this.mStaticModel = CyberEnvironment.GetGame().GetRoomManager().GetModel(room.ModelName);
     if (this.mStaticModel == null)
     {
         throw new Exception("No modeldata found for roomID " + room.RoomId);
     }
     this.mDynamicModel = new DynamicRoomModel(this.mStaticModel, room);
     this.mCoordinatedItems = new HybridDictionary();
     this.gotPublicPool = room.RoomData.Model.gotPublicPool;
     this.mGameMap = new byte[this.Model.MapSizeX, this.Model.MapSizeY];
     this.mItemHeightMap = new double[this.Model.MapSizeX, this.Model.MapSizeY];
     this.userMap = new HybridDictionary();
     this.walkableList = this.GetWalkablePoints();
 }
示例#2
0
 internal void Destroy()
 {
     this.userMap.Clear();
     this.mDynamicModel.Destroy();
     this.mCoordinatedItems.Clear();
     Array.Clear(this.mGameMap, 0, this.mGameMap.Length);
     Array.Clear(this.mUserItemEffect, 0, this.mUserItemEffect.Length);
     Array.Clear(this.mItemHeightMap, 0, this.mItemHeightMap.Length);
     this.userMap = null;
     this.mGameMap = null;
     this.mUserItemEffect = null;
     this.mItemHeightMap = null;
     this.mCoordinatedItems = null;
     this.mDynamicModel = null;
     this.room = null;
     this.mStaticModel = null;
 }