This commit is contained in:
2026-02-27 11:22:22 -03:00
parent 28f0422771
commit b52b7f4c44
7 changed files with 208 additions and 0 deletions
+46
View File
@@ -6,6 +6,7 @@ import { AssetManager } from "./assets.ts";
import { create_player } from "./player.ts";
import { UIButton } from "./components/ui_components.ts";
import { open_about } from "./about.ts";
import { create_crop_entity, Crop } from "./components/crop.ts";
export function start_game(world: ClientWorld) {
world.state = "game";
@@ -35,4 +36,49 @@ export function start_game(world: ClientWorld) {
about_button.add(new Position(world.canvas.width / 2 - 150, world.canvas.height / 2 + 80));
about_button.add(new UIButton("About", 320, 64, () => open_about()));
world.add_entity(about_button);
world.add_entity(create_crop_entity(
0,
0,
new Crop(5, [4, 4, 4, 4], [
"bworld:potato_seeds",
"bworld:potato_stage_1",
"bworld:potato_stage_2",
"bworld:potato_stage_3",
"bworld:potato_stage_4",
], "bworld:potato"),
));
world.add_entity(create_crop_entity(
32,
0,
new Crop(5, [5, 5, 5, 5], [
"bworld:carrot_seeds",
"bworld:carrot_stage_1",
"bworld:carrot_stage_2",
"bworld:carrot_stage_3",
"bworld:carrot_stage_4",
], "bworld:carrot"),
));
world.add_entity(create_crop_entity(
0,
32,
new Crop(5, [10, 10, 10, 10], [
"bworld:pumpkin_seeds",
"bworld:pumpkin_stage_1",
"bworld:pumpkin_stage_2",
"bworld:pumpkin_stage_3",
"bworld:pumpkin_stage_4",
], "bworld:pumpkin"),
));
world.add_entity(create_crop_entity(
32,
32,
new Crop(5, [7, 7, 7, 7], [
"bworld:tomato_seeds",
"bworld:tomato_stage_1",
"bworld:tomato_stage_2",
"bworld:tomato_stage_3",
"bworld:tomato_stage_4",
], "bworld:tomato"),
));
}