예제 #1
0
파일: Gamemap.cs 프로젝트: BjkGkh/07052014
        public Gamemap(Room room)
        {
            this.room = room;
            this.DiagonalEnabled = true;
            this.mStaticModel = SilverwaveEnvironment.GetGame().GetRoomManager().GetModel(room.ModelName);
            if (mStaticModel == null)
                throw new Exception("No modeldata found for roomID " + room.RoomId);
            this.mDynamicModel = new DynamicRoomModel(this.mStaticModel);

            this.mCoordinatedItems = new Hashtable();

            this.gotPublicPool = room.RoomData.Model.gotPublicPool;
            this.mGameMap = new byte[Model.MapSizeX, Model.MapSizeY];
            this.mItemHeightMap = new double[Model.MapSizeX, Model.MapSizeY];
            userMap = new Hashtable();
        }
예제 #2
0
파일: Gamemap.cs 프로젝트: BjkGkh/07052014
        public Gamemap(string model)
        {
            try
            {
                this.DiagonalEnabled = true;
                this.mStaticModel = SilverwaveEnvironment.GetGame().GetRoomManager().GetModel(model);
                if (mStaticModel == null)
                    throw new Exception("No modeldata found for roomID " + room.RoomId);
                this.mDynamicModel = new DynamicRoomModel(this.mStaticModel);

                this.mCoordinatedItems = new Hashtable();

                this.gotPublicPool = false;
                this.mGameMap = new byte[Model.MapSizeX, Model.MapSizeY];
                this.mItemHeightMap = new double[Model.MapSizeX, Model.MapSizeY];
                userMap = new Hashtable();
            }
            catch (Exception e) { Console.WriteLine(e); }
        }
예제 #3
0
파일: Gamemap.cs 프로젝트: BjkGkh/07052014
        internal void Destroy()
        {
            userMap.Clear();
            mDynamicModel.Destroy();
            mCoordinatedItems.Clear();

            Array.Clear(mGameMap, 0, mGameMap.Length);
            Array.Clear(mUserItemEffect, 0, mUserItemEffect.Length);
            Array.Clear(mItemHeightMap, 0, mItemHeightMap.Length);

            userMap = null;
            mGameMap = null;
            mUserItemEffect = null;
            mItemHeightMap = null;
            mCoordinatedItems = null;
            mDynamicModel = null;
            room = null;
            mStaticModel = null;
        }