InitializeWorld() public method

public InitializeWorld ( World world, IntSize3 size ) : void
world World
size IntSize3
return void
コード例 #1
0
ファイル: DungeonGame.cs プロジェクト: jaenudin86/dwarrowdelf
        public DungeonGame(string gameDir, GameOptions options)
            : base(gameDir, options)
        {
            EnvironmentObject env;

            switch (options.Map)
            {
            case GameMap.Fortress:
                env = FortressWorldCreator.InitializeWorld(this.World, options.MapSize);
                break;

            case GameMap.Adventure:
                var dwc = new DungeonWorldCreator(this.World);
                dwc.InitializeWorld(this.World, options.MapSize);
                env = dwc.MainEnv;
                break;

            default:
                throw new Exception();
            }

            var player = CreatePlayer(env);

            this.AddPlayer(player);
        }
コード例 #2
0
ファイル: DungeonGame.cs プロジェクト: tomba/dwarrowdelf
        public DungeonGame(string gameDir, GameOptions options)
            : base(gameDir, options)
        {
            EnvironmentObject env;

            switch (options.Map)
            {
                case GameMap.Fortress:
                    env = FortressWorldCreator.InitializeWorld(this.World, options.MapSize);
                    break;

                case GameMap.Adventure:
                    var dwc = new DungeonWorldCreator(this.World);
                    dwc.InitializeWorld(this.World, options.MapSize);
                    env = dwc.MainEnv;
                    break;

                default:
                    throw new Exception();
            }

            var player = CreatePlayer(env);
            this.AddPlayer(player);
        }