예제 #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);
        }
예제 #2
0
        public SceneGame(Game game, SaveFile saveFile) : base(game)
        {
            SaveFile = saveFile;

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

            Load();

            Player = Entities.First(x => x is Hero);

            CameraMap   = Player.Map;
            CameraFocus = new CameraFocus(Player);

            Spawner = new EnemySpawner(this, 5);
        }
예제 #3
0
        public void AddNormalTurn()
        {
            ActionQueue queue = World.ActionQueue;

            queue.Add(new TurnTakerItem(queue, this));
        }
예제 #4
0
 public TurnTakerSpawner(ActionQueue queue, EnemySpawner spawner) : base(queue)
 {
     Spawner = spawner;
 }
예제 #5
0
 public TurnTakerWorld(ActionQueue queue, SceneGame world) : base(queue)
 {
     World = world;
 }
예제 #6
0
 public TurnTaker(ActionQueue queue)
 {
     Queue = queue;
 }
예제 #7
0
 public TurnForceSkill(ActionQueue queue, TurnTaker turnTaker, Skill skill) : base(queue, turnTaker)
 {
     Skill = skill;
 }
예제 #8
0
 public Turn(Turn root, TurnTaker turnTaker)
 {
     Queue     = root.Queue;
     TurnTaker = turnTaker;
     Root      = root;
 }
예제 #9
0
 public Turn(ActionQueue queue, TurnTaker turnTaker)
 {
     Queue     = queue;
     TurnTaker = turnTaker;
 }
예제 #10
0
 public TurnTakerCloud(ActionQueue queue, Cloud cloud) : base(queue)
 {
     Cloud = cloud;
 }
예제 #11
0
 public TurnTakerItem(ActionQueue queue, Item entity) : base(queue)
 {
     Entity = entity;
 }
예제 #12
0
 public TurnTakerCreatureNormal(ActionQueue queue, Creature entity) : base(queue)
 {
     Entity = entity;
 }
예제 #13
0
 public TurnTakerCreatureControl(ActionQueue queue, Creature creature) : base(queue)
 {
     Creature = creature;
 }