Esempio n. 1
0
        public SceneGame(Game game) : base(game)
        {
            string saveName = $"save{DateTime.Now.ToString("ddMMyyyyHHmm")}";

            SaveFile = new SaveFile(new DirectoryInfo(Path.Combine(SaveFile.SaveDirectory.FullName, saveName)))
            {
                Name       = "Test",
                CreateTime = DateTime.Now,
            };

            ActionQueue = new ActionQueue(this);
            Menu        = new PlayerUI(this);

            CreateHome();

            PushObjects();

            var startTile = MapHome.EnumerateTiles().Where(tile => !tile.Solid).Shuffle(Random).First();

            Player = new Hero(this);
            Player.MoveTo(startTile, 1);
            Player.AddControlTurn();

            CameraMap   = MapHome;
            CameraFocus = new CameraFocus(Player);

            Player.Pickup(new Ingot(this, Material.Bone, 80));
            Player.Pickup(new Ingot(this, Material.Dilithium, 80));
            Player.Pickup(new Ingot(this, Material.Tiberium, 80));
            Player.Pickup(new Ingot(this, Material.Basalt, 80));
            Player.Pickup(new Ingot(this, Material.Meteorite, 80));
            Player.Pickup(new Ingot(this, Material.Obsidiorite, 80));
            Player.Pickup(new Ingot(this, Material.Jauxum, 80));
            Player.Pickup(new Ingot(this, Material.Karmesine, 80));
            Player.Pickup(new Ingot(this, Material.Ovium, 80));
            Player.Pickup(new Ingot(this, Material.Ardite, 80));
            Player.Pickup(new Ingot(this, Material.Cobalt, 80));
            Player.Pickup(new Ingot(this, Material.Manyullyn, 80));
            Player.Pickup(new Ingot(this, Material.Terrax, 80));
            Player.Pickup(new Ingot(this, Material.Triberium, 80));
            Player.Pickup(new Ingot(this, Material.Aurorium, 80));
            Player.Pickup(new Ingot(this, Material.Violium, 80));
            Player.Pickup(new Ingot(this, Material.Astrium, 80));
            Player.Pickup(new Ingot(this, Material.Ignitz, 80));
            Player.Pickup(new Ingot(this, Material.Tritonite, 80));
            Player.Pickup(new ItemFeather(this, 80));
            Player.Pickup(new ItemHandle(this, 80));

            Quest getOre    = new TutorialGetOre(this);
            Quest getFuel   = new TutorialGetFuel(this, getOre);
            Quest smeltOre  = new TutorialSmeltOre(this, getOre, getFuel);
            Quest buildAdze = new TutorialBuildAdze(this, smeltOre);

            Quests.Add(getOre);
            Quests.Add(getFuel);
            Quests.Add(smeltOre);
            Quests.Add(buildAdze);

            Spawner = new EnemySpawner(this, 5);
        }