/*  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;
 }
Exemple #2
0
 /*************************************************************************************************************************
  *** 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;
 }
Exemple #3
0
 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;
 }
Exemple #4
0
 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: Copy constructor
  *****************************************************
  * Description: copys the class instance for HERO
  * Input: Void
  * Output: Void
  * IN/OUT AGGS:
  *   Hero :hero
  * RETURN : void
  */
 public Hero(Hero copyhero)
 {
     Protection = copyhero.Protection;
     Weapon     = copyhero.Weapon;
 }
 /*  Method: default 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()
 {
     Protection = 50;
     Weapon     = Global.WeaponType.AXE;
 }