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); }
public void SetTargetGladiator(Gladiator gladiator) { Target = gladiator; gladiator.Target = this; TargetGladiator.DeathEvent += DeathEventHandler; this.DeathEvent += DeathEventHandler; }
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; } }
public GladiatorViewModel(Gladiator glad) { this.Name = glad.Name; this.kills = glad.Kills.ToString(); this.Reputation = glad.Reputation.ToString(); }
private void OnInteractionTriggered(Gladiator unit) { InteractionController.Interact(unit, this); }