-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.ts
More file actions
48 lines (39 loc) · 1.4 KB
/
test.ts
File metadata and controls
48 lines (39 loc) · 1.4 KB
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
// tests go here; this will not be compiled when this package is used as an extension.
namespace test {
let Test = geode.register("Test");
let keyList: Key[] = [
new StringKey("a"),
new StringKey("b")
];
let branchList = yggdrasil.registerBranchWithList(keyList)
for (let value of branchList.unpack()) {
Test.log(value.unpack());
}
let testTarget = sprites.create(img`
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
`);
let testKey = yggdrasil.packStringKey("wawa");
let testSpool = yggdrasil.buildKeySpool(testKey);
testSpool.addTo(testTarget);
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
if (testSpool.getSprite() != null) {
Test.log(testSpool.unravel());
testSpool.removeFrom();
}
});
}