Add: ajout d'un prix au skin

stub-api
Thomas Chazot 3 years ago
parent 7605c26acf
commit bd57d5a576

@ -1,13 +1,13 @@
import { Skin } from "./core/skin";
let tabSkinApp:Skin[]=[
new Skin("S0001", "Bob",require('bob_party/assets/BobsSkins/BobClassic.png')),
new Skin("S0002", "Bob Blue",require('bob_party/assets/BobsSkins/BobBlue.png')),
new Skin("S0003", "Bob BW",require('bob_party/assets/BobsSkins/BobBW.png')),
new Skin("S0004", "Bob Green",require('bob_party/assets/BobsSkins/BobGreen.png')),
new Skin("S0005", "Bob P&T",require('bob_party/assets/BobsSkins/BobPinkTurquoise.png')),
new Skin("S0006", "Bob Red",require('bob_party/assets/BobsSkins/BobRed.png')),
new Skin("S0007", "Bob Cute",require('bob_party/assets/BobsSkins/BobYellowGreenBlueHeart.png')),
new Skin("S0001", "Bob Classsique",require('bob_party/assets/BobsSkins/BobClassic.png'), 0),
new Skin("S0002", "Bob Blue",require('bob_party/assets/BobsSkins/BobBlue.png'), 100),
new Skin("S0003", "Bob BW",require('bob_party/assets/BobsSkins/BobBW.png'), 100),
new Skin("S0004", "Bob Green",require('bob_party/assets/BobsSkins/BobGreen.png'), 100),
new Skin("S0005", "Bob Pink Turquoise",require('bob_party/assets/BobsSkins/BobPinkTurquoise.png'), 100),
new Skin("S0006", "Bob Red",require('bob_party/assets/BobsSkins/BobRed.png'), 100),
new Skin("S0007", "Bob Cute",require('bob_party/assets/BobsSkins/BobYellowGreenBlueHeart.png'), 100),
]

@ -4,11 +4,13 @@ export class Skin{
readonly Id: string;
private Name: string;
private Source: ImageSourcePropType;
private Cost:number;
constructor(id:string, name: string, source:ImageSourcePropType){
constructor(id:string, name: string, source:ImageSourcePropType, Cost:number){
this.Id=id;
this.Name=name;
this.Source=source;
this.Cost=Cost;
}
setSkinName(name: string){
@ -30,4 +32,12 @@ export class Skin{
getSkinId(){
return this.Id;
}
getSkinCost(){
return this.Cost;
}
setSkinCost(cost:number){
this.Cost=cost;
}
}
Loading…
Cancel
Save