catfooll

Skin

May 22nd, 2024
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. class JUGADOR_SKIN {
  2. constructor(jugador, C, TR, AC) {
  3. this.jugador = jugador; // Instancia de JUGADOR
  4. this.color_piel = C;
  5. this.traje = TR;
  6. this.accesory = AC;
  7. }
  8. mostrarInfo() {
  9. document.write("<br> - El jugador de nombre " + this.jugador.nombre + " de color de piel " + this.color_piel + " con traje de: " + this.traje + " de arma " + this.accesory + "<br>");
  10. }
  11. }
  12.  
  13. T3.mostrar();
  14. let p1_skin = new JUGADOR_SKIN(p1, "AZUL", "SOLDADO", "UZI");
  15. p1_skin.mostrarInfo();
  16.  
  17. let p2_skin = new JUGADOR_SKIN(p2, "VERDE", "GUERRERO", "ESPADA");
  18. p2_skin.mostrarInfo();
  19.  
  20. let p3_skin = new JUGADOR_SKIN(p3, "BLANCO", "ARTILLERO", "TORRETA");
  21. p3_skin.mostrarInfo();
  22. let p4_skin = new JUGADOR_SKIN(p4, "BLANCO", "CAMUFLAJE", "NAVAJA")
  23. p4_skin.mostrarInfo();
Add Comment
Please, Sign In to add comment