Exemplo n.º 1
0
        //public EventNode FailureNode;
        public void Show(Size size)
        {
            WorldFactory worldFactory = new WorldFactory(this.randomGenerator);

            this.worldLoader = worldFactory.Build(this.difficulty, size);
            LevelPlayer levelPlayer = this.player.PrepareForNewLevel();

            this.worldLoader.addItemAndDisableUnloading(levelPlayer);
            this.screen = new WorldScreen(size, levelPlayer, this.worldLoader);
        }
Exemplo n.º 2
0
        private WorldScreen makeWorldScreen()
        {
            WeaponAugmentFactory         factory   = new WeaponAugmentFactory();
            List <WeaponAugmentTemplate> templates = new List <WeaponAugmentTemplate>()
            {
                factory.Damager, factory.Flier
            };
            WeaponStats weaponStats = factory.BasicWeapon.WithAugments(templates);

            List <WeaponStats> enemyWeapons = new List <WeaponStats>()
            {
                weaponStats
            };

            Size         size         = this.size;
            WorldFactory worldFactory = new WorldFactory(new Random());
            WorldLoader  worldLoader  = worldFactory.Build(2, this.size);
            LevelPlayer  levelPlayer  = this.player.PrepareForNewLevel();

            worldLoader.addItemAndDisableUnloading(levelPlayer);
            this.worldScreen = new WorldScreen(size, levelPlayer, worldLoader);
            this.worldScreen.setEscapeEnabled(true);
            return(this.worldScreen);
        }