-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
88 lines (83 loc) · 2.06 KB
/
index.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
80
81
82
83
84
85
86
87
88
import {
Project,
Sprite,
} from "./cdn.js";
import Utils from "./Utilities/utils.js"
import Stage from "./Stage/Stage.js";
import Entity from "./Sprites/Entity/Entity.js";
import PlayerHand from "./Sprites/PlayerHand/PlayerHand.js";
import Block from "./Sprites/Block/Block.js";
import Generate from "./Sprites/Generate/Generate.js";
import Player from "./Sprites/Player/Player.js";
import Chat from "./Sprites/Chat/Chat.js";
Utils.log("log", "[Base] Making Stage")
const stage = new Stage({ costumeNumber: 1 });
Utils.log("log", "[Base] Generating Sprites")
const sprites = {
Entity: new Entity({
x: -62,
y: -115,
direction: 90,
rotationStyle: Sprite.RotationStyle.ALL_AROUND,
costumeNumber: 8,
size: 100,
visible: false,
layerOrder: 1,
}),
PlayerHand: new PlayerHand({
x: -140,
y: -133.99831429687038,
direction: -8.512964269895306,
rotationStyle: Sprite.RotationStyle.ALL_AROUND,
costumeNumber: 1,
size: 100,
visible: true,
layerOrder: 5,
}),
Block: new Block({
x: 288,
y: -93.99831429687038,
direction: 90,
rotationStyle: Sprite.RotationStyle.ALL_AROUND,
costumeNumber: 2,
size: 200,
visible: false,
layerOrder: 2,
}),
Generate: new Generate({
x: -240,
y: 0,
direction: 0,
rotationStyle: Sprite.RotationStyle.ALL_AROUND,
costumeNumber: 1,
size: 100,
visible: false,
layerOrder: 3,
}),
Player: new Player({
x: -140,
y: -143.99831429687038,
direction: 90.26342087318655,
rotationStyle: Sprite.RotationStyle.LEFT_RIGHT,
costumeNumber: 1,
size: 100,
visible: true,
layerOrder: 4,
}),
Chat: new Chat({
x: -240,
y: 0,
direction: 0,
rotationStyle: Sprite.RotationStyle.ALL_AROUND,
costumeNumber: 1,
size: 100,
visible: false,
layerOrder: 6,
}),
};
Utils.log("log", "[Base] Constructing Project")
const project = new Project(stage, sprites, {
frameRate: 60, //Most monitors are at this frame rate
});
Utils.log("log", "[Base] Setting framerate to 60 from 30")
export default project;