create-bloop 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -52,14 +52,14 @@ export function createDrawState(toodle: Toodle): DrawState {
|
|
|
52
52
|
// Title screen container
|
|
53
53
|
const titleScreen = root.add(toodle.Node({}));
|
|
54
54
|
const titleText = titleScreen.add(
|
|
55
|
-
toodle.Text("
|
|
55
|
+
toodle.Text("Roboto", "MARIO ROLLBACK", {
|
|
56
56
|
fontSize: 24,
|
|
57
57
|
color: { r: 1, g: 1, b: 1, a: 1 },
|
|
58
58
|
position: { x: 0, y: 20 },
|
|
59
59
|
}),
|
|
60
60
|
);
|
|
61
61
|
const subtitleText = titleScreen.add(
|
|
62
|
-
toodle.Text("
|
|
62
|
+
toodle.Text("Roboto", "[Space] Local [Enter] Online", {
|
|
63
63
|
fontSize: 10,
|
|
64
64
|
color: { r: 1, g: 1, b: 1, a: 1 },
|
|
65
65
|
position: { x: 0, y: 0 },
|
|
@@ -121,14 +121,14 @@ export function createDrawState(toodle: Toodle): DrawState {
|
|
|
121
121
|
const p2 = createPoseQuads(LUIGI_COLOR);
|
|
122
122
|
|
|
123
123
|
const p1Score = gameScreen.add(
|
|
124
|
-
toodle.Text("
|
|
124
|
+
toodle.Text("Roboto", "P9: 0", {
|
|
125
125
|
fontSize: 16,
|
|
126
126
|
color: MARIO_COLOR,
|
|
127
127
|
}),
|
|
128
128
|
);
|
|
129
129
|
|
|
130
130
|
const p2Score = gameScreen.add(
|
|
131
|
-
toodle.Text("
|
|
131
|
+
toodle.Text("Roboto", "P2: 0", {
|
|
132
132
|
fontSize: 16,
|
|
133
133
|
color: LUIGI_COLOR,
|
|
134
134
|
}),
|
|
@@ -164,7 +164,10 @@ export function draw(g: typeof game, toodle: Toodle, state: DrawState) {
|
|
|
164
164
|
|
|
165
165
|
// Update title text based on phase
|
|
166
166
|
if (bag.phase === "title") {
|
|
167
|
-
|
|
167
|
+
const isMobile = toodle.resolution.width < toodle.resolution.height;
|
|
168
|
+
state.subtitleText.text = isMobile
|
|
169
|
+
? "Tap to find opponent"
|
|
170
|
+
: "[Enter/Click] Online [Space] Local";
|
|
168
171
|
} else if (bag.phase === "waiting") {
|
|
169
172
|
state.subtitleText.text = "Waiting for opponent...";
|
|
170
173
|
}
|
|
@@ -43,8 +43,8 @@ await toodle.assets.registerBundle("main", {
|
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
await toodle.assets.loadFont(
|
|
46
|
-
"
|
|
47
|
-
new URL("https://toodle.gg/fonts/
|
|
46
|
+
"Roboto",
|
|
47
|
+
new URL("https://toodle.gg/fonts/Roboto-Regular-msdf.json"),
|
|
48
48
|
);
|
|
49
49
|
|
|
50
50
|
const drawState = createDrawState(toodle);
|
|
@@ -78,8 +78,8 @@ async function loadTape(bytes: Uint8Array, fileName: string) {
|
|
|
78
78
|
});
|
|
79
79
|
|
|
80
80
|
await toodle.assets.loadFont(
|
|
81
|
-
"
|
|
82
|
-
new URL("https://toodle.gg/fonts/
|
|
81
|
+
"Roboto",
|
|
82
|
+
new URL("https://toodle.gg/fonts/Roboto-Regular-msdf.json"),
|
|
83
83
|
);
|
|
84
84
|
|
|
85
85
|
const drawState = createDrawState(toodle);
|