-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbgblueprint.js
79 lines (68 loc) · 2.35 KB
/
bgblueprint.js
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// background entities
class Ground extends Entity{
constructor(spritesheet, posX, posY, width, height) {
// pomle pixel
let img = new Sprite(spritesheet, 0, 0, 16, 16);
super(img, "ground", posX, posY, width, height);
}
}
class Pipe extends Entity {
constructor(tileset, xPos, yPos, width, height) {
const sprite = new Sprite(tileset, 0, 180, 35, 35);
super( sprite,'pipe', xPos, yPos, width, height);
}
}
class Stair extends Entity {
constructor(tileset, xPos, yPos, width, height) {
const sprite = new Sprite(tileset, 0, 18, 18, 18);
super( sprite,'stair', xPos, yPos, width, height);
}
}
class Shrub extends Entity {
constructor(tileset, xPos, yPos, width, height) {
const sprite = new Sprite(tileset, 198.5, 162.5, 53, 17);
super( sprite,'shrub', xPos, yPos, width, height);
}
}
class Mountain extends Entity {
constructor(tileset, xPos, yPos, width, height) {
const sprite = new Sprite(tileset, 0, 0, 90, 39);
super( sprite,'mountain', xPos, yPos, width, height);
}
}
class SmallCloud extends Entity {
constructor(tileset, xPos, yPos, width, height) {
const sprite = new Sprite(tileset, 64.5, 0, 33, 24);
super( sprite,'cloud', xPos, yPos, width, height);
}
}
class MediumCloud extends Entity {
constructor(tileset, xPos, yPos, width, height) {
const sprite = new Sprite(tileset, 0, 24.5, 48, 24);
super( sprite,'cloud', xPos, yPos, width, height);
}
}
class LargeCloud extends Entity {
constructor(tileset, xPos, yPos, width, height) {
const sprite = new Sprite(tileset, 0, 0, 64, 24);
super( sprite,'cloud', xPos, yPos, width, height);
}
}
class Flag extends Entity {
constructor(tileset, xPos, yPos, width, height) {
const sprite = new Sprite(tileset, 289, 153, 16, 27);
super( sprite,'flag', xPos, yPos, width, height);
}
}
class Flagpole extends Entity {
constructor(tileset, xPos, yPos, width, height) {
const sprite = new Sprite(tileset, 289, 163, 16, 18);
super( sprite,'flag', xPos, yPos, width, height);
}
}
class Castle extends Entity {
constructor(tileset, xPos, yPos, width, height) {
const sprite = new Sprite(tileset, 0, 0, 80, 80);
super( sprite,'flag', xPos, yPos, width, height);
}
}