Exemple #1
0
 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;
 }
Exemple #2
0
 public Superheroe(){
     this.CantidadVidas = 0;
     this.Superpoder = new Superpoder();
     this.Nombre = "";
     this.AnioCreacion = 0;
     this.Universo = "";
     this.Stamina = 0;
 }
Exemple #3
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();
 }
Exemple #7
0
 public void SetSuperpoder(Superpoder superpoder)
 {
     this.Superpoder = superpoder;
 }
Exemple #8
0
 // 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;
 }
Exemple #11
0
 public override void Atacar(Personaje p, Superpoder s)
 {
     base.Atacar(p);
     Console.WriteLine("El heroe ataca al villano.");
     this.Usar(s);
 }