/// <summary> /// This Function is used to add a character to a player. A player may have a maximum of 6 characters. /// </summary> /// <param name="_character">The character to be added</param> public void AddCharacter(Units.Character _character) { if (this.ControlledCharacters.Count < 4) { this.ControlledCharacters.Add(_character); } else { RPG.UI.MessageForm mes = new RPG.UI.MessageForm("You cannot have more than 4 characters"); mes.ShowDialog(); } }
/// <summary> /// This Function is used to remove a character from a player. /// </summary> /// <param name="_character">The character to be removed</param> public void RemoveCharacter(Units.Character _character) { if (this.ControlledCharacters.Contains(_character)) { this.ControlledCharacters.Remove(_character); } else { RPG.UI.MessageForm mes = new RPG.UI.MessageForm("An error occured while trying to remove a character"); mes.ShowDialog(); } }