InitializeWorld() public method

public InitializeWorld ( World world, IntSize3 size ) : void
world World
size IntSize3
return void
Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }