/* Method: parameterized constructor ***************************************************** * Description: Overwrites the class instance for HERO * Input: Void * Output: Void * IN/OUT AGGS: * * * public short Protection; * public Global.WeaponType Weapon; * RETURN : void */ public Hero(string name, Global.RaceType race, short health, short protection, Global.WeaponType weapon) { this.Name = name; this.Race = race; this.Health = health; Protection = protection; Weapon = weapon; }
/************************************************************************************************************************* *** METHOD Class Hero(string ,Global.RaceType ,int ,int ,Global.WeaponType ) *** ************************************************************************************************************************** *** DESCRIPTION : This creates a character in the game as set by the input varaibles in program.cs *** *** INPUT ARGS : name, race,health,protection, weapon *** *** OUTPUT ARGS: NONE, just allows other classes to use data *** *** IN/OUT ARGS : NONE *** *** RETURN : NONE *** **************************************************************************************************************************/ public Hero(string name, Global.RaceType race, short health, short protection = 50, Global.WeaponType weapon = Global.WeaponType.AXE) : base(name, race, health) { Name = name; Race = race; Health = health; Protection = protection; Weapon = weapon; }
public Hero(string n = "Geralt", Global.RaceType r = Global.RaceType.DWARF, short h = 200, short p = 50, Global.WeaponType w = Global.WeaponType.AXE) : base(n, r, h) { Name = n; Race = r; Health = h; Weapon = w; Protection = p; }
public Hero(string n, Global.RaceType r, short h, short p = 50, Global.WeaponType w = Global.WeaponType.AXE) : base(n, r, h) { Name = n; Race = r; Health = h; Weapon = w; Protection = p; }
/*********************************************************************** * *** METHOD Hero *** * ********************************************************************* * *** DESCRIPTION : Overloaded constructor. Creates new Hero object *** * *** INPUT ARGS : Hero object *** * *** OUTPUT ARGS : none *** * *** IN/OUT ARGS : none *** * *** RETURN : void *** * ********************************************************************/ public Character(string n = "Geralt", Global.RaceType r = Global.RaceType.WITCHER, short h = 200) { Name = n; Race = r; Health = h; }
public Character(string name = "Geralt", Global.RaceType race = Global.RaceType.WITCHER, short health = 200) { Name = name; Race = race; Health = health; }