-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.ts
More file actions
44 lines (34 loc) · 1.33 KB
/
Copy pathapp.ts
File metadata and controls
44 lines (34 loc) · 1.33 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
namespace microScience {
import SceneManager = user_interface_base.SceneManager
import Scene = user_interface_base.Scene
import AppInterface = user_interface_base.AppInterface
// application configuration
user_interface_base.getIcon = (id) => icons.get(id)
user_interface_base.resolveTooltip = (ariaId: string) => ariaId
export class App implements AppInterface {
sceneManager: SceneManager
buffer: Buffer
constructor() {
basic.pause(10)//wait to allow system to load
this.sceneManager = new SceneManager()
const arcadeShieldConnected = shieldhelpers.shieldPresent()//check if connected to shield or not
if (arcadeShieldConnected) {//if connected create a home menu
this.pushScene(new microScience.QualificationScene(this))
}
}
public pushScene(scene: Scene) {//add scene to scenemanager
let i = 1//check if can remove
this.sceneManager.pushScene(scene)
}
public popScene() {//remove scene from scenemanager
this.sceneManager.popScene()
}
public save(slot: string, buffer: Buffer) {
this.buffer = buffer
return true
}
public load(slot: string) {
return this.buffer
}
}
}