From: Brendan Hansen Date: Mon, 28 Feb 2022 21:08:48 +0000 (-0600) Subject: created key texture X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=0305b4e8bc571392276dc481cad5f862addbf217;p=bar-game.git created key texture --- diff --git a/docs/credits.md b/docs/credits.md new file mode 100644 index 0000000..cda937c --- /dev/null +++ b/docs/credits.md @@ -0,0 +1,10 @@ + + +# Programmers +Brendan Hansen +Collin Rumpca + +# Artists +Chris Loutche +Brendan Hansen +Collin Rumpca \ No newline at end of file diff --git a/run_tree/assets/images/keg.png b/run_tree/assets/images/keg.png new file mode 100644 index 0000000..d68b662 Binary files /dev/null and b/run_tree/assets/images/keg.png differ diff --git a/run_tree/scenes/quick_save_new.scene b/run_tree/scenes/quick_save_new.scene index 6f015f2..7f967bc 100644 --- a/run_tree/scenes/quick_save_new.scene +++ b/run_tree/scenes/quick_save_new.scene @@ -29,8 +29,8 @@ color.a = 1.0000 [Player] id = 12 flags = 2 -pos.x = 170.8592 -pos.y = 40.2234 +pos.x = 245.8789 +pos.y = 48.7460 size.x = 32.0000 size.y = 32.0000 :MovementComponent @@ -40,7 +40,7 @@ controls.left = 65 controls.right = 68 controls.interact = 70 controls.pick_up = 71 -facing = 3 +facing = 4 :PlayerComponent holding = 0 :RenderComponent @@ -68,11 +68,62 @@ color.g = 1.0000 color.b = 1.0000 color.a = 1.0000 +[Tap] +id = 18 +flags = 3 +pos.x = 208.0000 +pos.y = 16.0000 +size.x = 32.0000 +size.y = 32.0000 +:RenderComponent +layer = 0 +color.r = 1.0000 +color.g = 1.0000 +color.b = 1.0000 +color.a = 1.0000 +:DispenserComponent +item = "beer" +max_timeout = 2.0000 + +[Tap] +id = 19 +flags = 3 +pos.x = 176.0000 +pos.y = 16.0000 +size.x = 32.0000 +size.y = 32.0000 +:RenderComponent +layer = 0 +color.r = 1.0000 +color.g = 1.0000 +color.b = 1.0000 +color.a = 1.0000 +:DispenserComponent +item = "beer" +max_timeout = 2.0000 + +[Tap] +id = 20 +flags = 3 +pos.x = 144.0000 +pos.y = 16.0000 +size.x = 32.0000 +size.y = 32.0000 +:RenderComponent +layer = 0 +color.r = 1.0000 +color.g = 1.0000 +color.b = 1.0000 +color.a = 1.0000 +:DispenserComponent +item = "beer" +max_timeout = 2.0000 + [Patreon] -id = 15 +id = 22 flags = 1 -pos.x = 397.0000 -pos.y = 59.0000 +pos.x = 417.0000 +pos.y = 142.0000 size.x = 32.0000 size.y = 32.0000 :RenderComponent @@ -82,24 +133,41 @@ color.g = 0.0000 color.b = 0.0000 color.a = 1.0000 :PatreonComponent -state = 1 +state = 0 order_item = "beer" holding = 0 +consume_timeout = 0.0000 [Tap] id = 14 flags = 3 -pos.x = 32.0000 +pos.x = 240.0000 pos.y = 16.0000 size.x = 32.0000 size.y = 32.0000 :RenderComponent layer = 1 -color.r = 0.2000 -color.g = 0.2000 +color.r = 1.0000 +color.g = 1.0000 color.b = 1.0000 color.a = 1.0000 :DispenserComponent item = "beer" max_timeout = 2.0000 +[Item_Entity] +id = 21 +flags = 4 +pos.x = 190.2672 +pos.y = 91.6549 +size.x = 16.0000 +size.y = 16.0000 +:RenderComponent +layer = 10 +color.r = 1.0000 +color.g = 1.0000 +color.b = 1.0000 +color.a = 1.0000 +:ItemComponent +item = "beer" + diff --git a/src/entity/schematics/tap.onyx b/src/entity/schematics/tap.onyx index 98a9907..e30f842 100644 --- a/src/entity/schematics/tap.onyx +++ b/src/entity/schematics/tap.onyx @@ -25,11 +25,13 @@ Tap :: struct { render :: (use this: ^Entity) { rect := this->get_rect(); - immediate_rectangle(rect.x, rect.y, rect.w, rect.h); + // immediate_rectangle(rect.x, rect.y, rect.w, rect.h); + immediate_image(^Tap.assets.texture, rect.x, rect.y, rect.w, rect.h); + } + + #persist assets: struct { + #tag "./assets/images/keg.png" + texture: Texture; } } -tap_assets: struct { - #tag "./assets/" - texture: Texture; -} \ No newline at end of file diff --git a/src/game.onyx b/src/game.onyx index 05d080b..7eeeacf 100644 --- a/src/game.onyx +++ b/src/game.onyx @@ -19,6 +19,7 @@ game_init :: () { // This process of queueing the asset bucket should // be made automatic somehow... queue_assets(^Player.assets); + queue_assets(^Tap.assets); load_assets();