コード例 #1
0
ファイル: World.cs プロジェクト: Alan-Baylis/WorldGenerator-1
        public World()
        {
            //Mobs = new ConcurrentDictionary<int, Mob>();
            //GameItems = new ConcurrentDictionary<int, GameItemDynamic>();

            RawSeed          = 123456;          //settingsNode.Attributes["RawSeed"].Value;
            GeneratorVersion = "1.0";           // settingsNode.Attributes["GeneratorVersion"].Value;
            GameObjectIdSeq  = 1;               //int.Parse(settingsNode.Attributes["GameObjectIdSeq"].Value);
            WorldType        = WorldType.Grass; // (WorldType)Convert.ToInt32(settingsNode.Attributes["WorldType"].Value);

            generator = new Generator(this, RawSeed);
            worldMap  = new WorldMap(this, generator);
            localMap  = new LocalMap(this, generator);
            water     = new Water(this);
        }
コード例 #2
0
ファイル: World.cs プロジェクト: Alan-Baylis/WorldGenerator-1
 public int GetHeightMapLevel(int x, int z)
 {
     return(LocalMap.Chunk(x / Global.CHUNK_SIZE, z / Global.CHUNK_SIZE).HeightMap[x % Global.CHUNK_SIZE, z % Global.CHUNK_SIZE]);
 }