Ejemplo n.º 1
0
 public async void AddGladiator(Gladiator glad)
 {
     //Need to figure out how to save all gladiator fields since it has methods on it, may have to store properties in another object, and instantiate a gladiator not sure
     //May have to refactor gladiator to just have a model/controller pattern
     //var collection = Database.GetCollection<Gladiator>("gladcontent");
     //await collection.InsertOneAsync(glad);
 }
Ejemplo n.º 2
0
 public void SetTargetGladiator(Gladiator gladiator)
 {
     Target                      = gladiator;
     gladiator.Target            = this;
     TargetGladiator.DeathEvent += DeathEventHandler;
     this.DeathEvent            += DeathEventHandler;
 }
Ejemplo n.º 3
0
        public async void AddGladiatorToHistory(Gladiator glad)
        {
            var GladiatorDBModel = new GladiatorViewModel(glad);
            var Collec = Database.GetCollection<GladiatorViewModel>("gladiatorhist");

            await Collec.InsertOneAsync(GladiatorDBModel);
            //Console.ReadLine();
        }
 public static void Interact(Gladiator player, IUnit target)
 {
     switch (target.Reputation)
     {
         case Reputation.Hostile:
             Player.Instance.CurrentGladiator.SetTargetGladiator(target as Gladiator);
             Program.GameState = GameState.Battle;
             return;
         case Reputation.Friendly:
         case Reputation.Neutral:
             Text.Clear();
             InteractWithFriendly(target);
             break;
     }
 }
Ejemplo n.º 5
0
 public GladiatorViewModel(Gladiator glad)
 {
     this.Name = glad.Name;
     this.kills = glad.Kills.ToString();
     this.Reputation = glad.Reputation.ToString();
 }
Ejemplo n.º 6
0
 private void OnInteractionTriggered(Gladiator unit)
 {
     InteractionController.Interact(unit, this);
 }
Ejemplo n.º 7
0
 private void OnInteractionTriggered(Gladiator unit)
 {
     InteractionController.Interact(unit, this);
 }
Ejemplo n.º 8
0
 public void SetTargetGladiator(Gladiator gladiator)
 {
     Target = gladiator;
     gladiator.Target = this;
     TargetGladiator.DeathEvent += DeathEventHandler;
     this.DeathEvent += DeathEventHandler;
 }