-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoretype.ts
41 lines (36 loc) · 1.04 KB
/
oretype.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
export default class Ore{
durability: number
name: string
price: number
maxY: number
minY: number
color: number=0
material: number
constructor(durability: number, name: string, price: number, miny: number, maxy: number, color: number, material: number){
this.durability = durability;
this.name = name;
this.price = price;
this.minY=miny;
this.maxY=maxy;
this.color = color;
this.material = material;
if(color===null)
color=0;
}
public setDurability(durability: number){
this.durability = durability;
}
public getDurability(){
return this.durability;
}
public setPrice(price: number){
this.price = price;
}
}
export class PlayerOre extends Ore{
owner: string;
constructor(durability: number, name: string, price: number, miny: number, maxy: number, color: number, material: number, owner: string){
super(durability,name,price,miny,maxy,color,material);
this.owner = owner;
}
}