public Superheroe(int valor1, Superpoder valor2, string nom, int anio, string univ, int stam){ this.CantidadVidas = valor1; this.Superpoder = valor2; this.Nombre = nom; this.AnioCreacion = anio; this.Universo = univ; this.Stamina = stam; }
public Superheroe(){ this.CantidadVidas = 0; this.Superpoder = new Superpoder(); this.Nombre = ""; this.AnioCreacion = 0; this.Universo = ""; this.Stamina = 0; }
static void Main(string[] args) { Superpoder superfuerza = new Superpoder(true, 3); Superheroe ironman = new Superheroe("Iron Man", 1963, "Marvel", 100, 5, superfuerza); Villano thanos = new Villano("Thanos", 1973, "Marvel", 100); Combate combate = new Combate(ironman, thanos, ironman, 2); }
public void SetSuperpoder(Superpoder valor) { this.Superpoder = valor; }
public Superheroe(int valor1, Superpoder valor2, string nom, int anio, string univ, int stam) : base(nom, anio, univ, stam) { this.CantidadVidas = valor1; this.Superpoder = valor2; }
public Superheroe() : base() { this.CantidadVidas = 0; this.Superpoder = new Superpoder(); }
public void SetSuperpoder(Superpoder superpoder) { this.Superpoder = superpoder; }
// constructor 1 public Superheroe(string nombre, int aniocreacion, string universo, int stamina, int cantidadvidas, Superpoder superpoder) : base(nombre, aniocreacion, universo, stamina) { this.CantidadVidas = cantidadvidas; this.Superpoder = superpoder; }
public void Usar(Superpoder s) { }
public Superheroe(int CantVidas, Superpoder super, string nom, int anio, string univ, int stam) : base(nom, anio, univ, stam) { this.CantidadVidas = CantVidas; this.Superpoder = super; }
public override void Atacar(Personaje p, Superpoder s) { base.Atacar(p); Console.WriteLine("El heroe ataca al villano."); this.Usar(s); }