diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f28239b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,4 @@ +root = true + +[*] +charset = utf-8 diff --git a/.gitattributes b/.gitattributes index dfe0770..8ad74f7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ -# Auto detect text files and perform LF normalization -* text=auto +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0af181c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Godot 4+ specific ignores +.godot/ +/android/ diff --git a/Sprites/smol-blank.png b/Sprites/smol-blank.png new file mode 100644 index 0000000..d8340ab Binary files /dev/null and b/Sprites/smol-blank.png differ diff --git a/Sprites/smol-blank.png.import b/Sprites/smol-blank.png.import new file mode 100644 index 0000000..e491fac --- /dev/null +++ b/Sprites/smol-blank.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://y2ytspjqefbk" +path="res://.godot/imported/smol-blank.png-51c82a3c375ab4daf5a8d1616f8dded2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/smol-blank.png" +dest_files=["res://.godot/imported/smol-blank.png-51c82a3c375ab4daf5a8d1616f8dded2.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Sprites/smol-down.png b/Sprites/smol-down.png new file mode 100644 index 0000000..b80f1c0 Binary files /dev/null and b/Sprites/smol-down.png differ diff --git a/Sprites/smol-down.png.import b/Sprites/smol-down.png.import new file mode 100644 index 0000000..3115cb8 --- /dev/null +++ b/Sprites/smol-down.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ducbe6ucctlr6" +path="res://.godot/imported/smol-down.png-cd3533b292c2d7a44da184d09b13084b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/smol-down.png" +dest_files=["res://.godot/imported/smol-down.png-cd3533b292c2d7a44da184d09b13084b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Sprites/smol-left.png b/Sprites/smol-left.png new file mode 100644 index 0000000..3dc4b33 Binary files /dev/null and b/Sprites/smol-left.png differ diff --git a/Sprites/smol-left.png.import b/Sprites/smol-left.png.import new file mode 100644 index 0000000..94fec9b --- /dev/null +++ b/Sprites/smol-left.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://25g6athehh1s" +path="res://.godot/imported/smol-left.png-cfade318b5da3280295f59252c799017.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/smol-left.png" +dest_files=["res://.godot/imported/smol-left.png-cfade318b5da3280295f59252c799017.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Sprites/smol-right.png b/Sprites/smol-right.png new file mode 100644 index 0000000..9219c25 Binary files /dev/null and b/Sprites/smol-right.png differ diff --git a/Sprites/smol-right.png.import b/Sprites/smol-right.png.import new file mode 100644 index 0000000..7c29672 --- /dev/null +++ b/Sprites/smol-right.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cmkql3pb4tbn8" +path="res://.godot/imported/smol-right.png-27e4b5e2a1e2b440b2b78d9f45084587.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/smol-right.png" +dest_files=["res://.godot/imported/smol-right.png-27e4b5e2a1e2b440b2b78d9f45084587.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Sprites/smol-up.png b/Sprites/smol-up.png new file mode 100644 index 0000000..4b6827c Binary files /dev/null and b/Sprites/smol-up.png differ diff --git a/Sprites/smol-up.png.import b/Sprites/smol-up.png.import new file mode 100644 index 0000000..41e886a --- /dev/null +++ b/Sprites/smol-up.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dj6mkweo8kgcs" +path="res://.godot/imported/smol-up.png-5b806d349790ea28a0054fca47589fdf.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/smol-up.png" +dest_files=["res://.godot/imported/smol-up.png-5b806d349790ea28a0054fca47589fdf.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Sprites/token-arrow.png b/Sprites/token-arrow.png new file mode 100644 index 0000000..521ef45 Binary files /dev/null and b/Sprites/token-arrow.png differ diff --git a/Sprites/token-arrow.png.import b/Sprites/token-arrow.png.import new file mode 100644 index 0000000..e4e328c --- /dev/null +++ b/Sprites/token-arrow.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bj53f2x3s7a43" +path="res://.godot/imported/token-arrow.png-e38c8e0a7c32fb29b14645c2166378d2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/token-arrow.png" +dest_files=["res://.godot/imported/token-arrow.png-e38c8e0a7c32fb29b14645c2166378d2.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Sprites/token-blank.png b/Sprites/token-blank.png new file mode 100644 index 0000000..4928f82 Binary files /dev/null and b/Sprites/token-blank.png differ diff --git a/Sprites/token-blank.png.import b/Sprites/token-blank.png.import new file mode 100644 index 0000000..dbd978a --- /dev/null +++ b/Sprites/token-blank.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dk6ygj130tlmy" +path="res://.godot/imported/token-blank.png-214933807261270cfe3fa5978972b459.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/token-blank.png" +dest_files=["res://.godot/imported/token-blank.png-214933807261270cfe3fa5978972b459.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/game.tscn b/game.tscn new file mode 100644 index 0000000..8a6d7d2 --- /dev/null +++ b/game.tscn @@ -0,0 +1,211 @@ +[gd_scene load_steps=7 format=3 uid="uid://sntwtley2f7d"] + +[ext_resource type="Texture2D" uid="uid://dj6mkweo8kgcs" path="res://Sprites/smol-up.png" id="1_80nbo"] +[ext_resource type="Script" uid="uid://c7c1yy0hv1u3r" path="res://logic.gd" id="1_e2o6t"] +[ext_resource type="Texture2D" uid="uid://cmkql3pb4tbn8" path="res://Sprites/smol-right.png" id="3_7jktm"] +[ext_resource type="Texture2D" uid="uid://ducbe6ucctlr6" path="res://Sprites/smol-down.png" id="4_ryrav"] +[ext_resource type="Texture2D" uid="uid://25g6athehh1s" path="res://Sprites/smol-left.png" id="5_eow3j"] +[ext_resource type="Texture2D" uid="uid://y2ytspjqefbk" path="res://Sprites/smol-blank.png" id="6_ryrav"] + +[node name="Node2D" type="Node2D" node_paths=PackedStringArray("icon_container", "progress_bar", "scroll_container")] +script = ExtResource("1_e2o6t") +icon_container = NodePath("CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer") +icons = Array[Texture]([ExtResource("1_80nbo"), ExtResource("3_7jktm"), ExtResource("4_ryrav"), ExtResource("5_eow3j"), ExtResource("6_ryrav")]) +progress_bar = NodePath("CanvasLayer/VBoxContainer/ProgressBar") +scroll_container = NodePath("CanvasLayer/VBoxContainer/HFlowContainer") + +[node name="CanvasLayer" type="CanvasLayer" parent="."] + +[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer"] +anchors_preset = 12 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = -136.0 +grow_horizontal = 2 +grow_vertical = 0 + +[node name="HFlowContainer" type="ScrollContainer" parent="CanvasLayer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 4 +vertical_scroll_mode = 0 + +[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/VBoxContainer/HFlowContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +alignment = 1 + +[node name="TextureRect" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect2" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect3" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect4" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect5" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect6" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect7" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect8" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect9" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect10" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect11" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect12" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect13" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect14" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect15" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect16" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect17" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect18" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect19" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect20" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect21" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect22" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect23" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect24" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect25" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect26" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect27" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect28" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect29" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect30" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect31" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect32" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect33" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect34" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +visible = false +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="ProgressBar" type="ProgressBar" parent="CanvasLayer/VBoxContainer"] +layout_mode = 2 +max_value = 1.0 +step = 0.0 diff --git a/game.tscn4139515006.tmp b/game.tscn4139515006.tmp new file mode 100644 index 0000000..b5eac73 --- /dev/null +++ b/game.tscn4139515006.tmp @@ -0,0 +1,178 @@ +[gd_scene load_steps=7 format=3 uid="uid://sntwtley2f7d"] + +[ext_resource type="Texture2D" uid="uid://dj6mkweo8kgcs" path="res://Sprites/smol-up.png" id="1_80nbo"] +[ext_resource type="Script" uid="uid://c7c1yy0hv1u3r" path="res://logic.gd" id="1_e2o6t"] +[ext_resource type="Texture2D" uid="uid://cmkql3pb4tbn8" path="res://Sprites/smol-right.png" id="3_7jktm"] +[ext_resource type="Texture2D" uid="uid://ducbe6ucctlr6" path="res://Sprites/smol-down.png" id="4_ryrav"] +[ext_resource type="Texture2D" uid="uid://25g6athehh1s" path="res://Sprites/smol-left.png" id="5_eow3j"] +[ext_resource type="Texture2D" uid="uid://y2ytspjqefbk" path="res://Sprites/smol-blank.png" id="6_ryrav"] + +[node name="Node2D" type="Node2D" node_paths=PackedStringArray("icon_container", "progress_bar", "scroll_container")] +script = ExtResource("1_e2o6t") +code_len = 30 +icon_container = NodePath("CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer") +icons = Array[Texture]([ExtResource("1_80nbo"), ExtResource("3_7jktm"), ExtResource("4_ryrav"), ExtResource("5_eow3j"), ExtResource("6_ryrav")]) +progress_bar = NodePath("CanvasLayer/VBoxContainer/ProgressBar") +scroll_container = NodePath("CanvasLayer/VBoxContainer/HFlowContainer") + +[node name="CanvasLayer" type="CanvasLayer" parent="."] + +[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer"] +anchors_preset = 12 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = -136.0 +grow_horizontal = 2 +grow_vertical = 0 + +[node name="HFlowContainer" type="ScrollContainer" parent="CanvasLayer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 4 +vertical_scroll_mode = 0 + +[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/VBoxContainer/HFlowContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +alignment = 1 + +[node name="TextureRect" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect2" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect3" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect4" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect5" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect6" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect7" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect8" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect9" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect10" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect11" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect12" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect13" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect14" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect15" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect16" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect17" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect18" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect19" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect20" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect21" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect22" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect23" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect24" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect25" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect26" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect27" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect28" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect29" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect30" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect31" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect32" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect33" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="TextureRect34" type="TextureRect" parent="CanvasLayer/VBoxContainer/HFlowContainer/HBoxContainer"] +layout_mode = 2 +texture = ExtResource("6_ryrav") + +[node name="ProgressBar" type="ProgressBar" parent="CanvasLayer/VBoxContainer"] +layout_mode = 2 +max_value = 1.0 +step = 0.0 diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..9d8b7fa --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icon.svg.import b/icon.svg.import new file mode 100644 index 0000000..d1f682d --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://co1xhobfry7xn" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/logic.gd b/logic.gd new file mode 100644 index 0000000..a221d23 --- /dev/null +++ b/logic.gd @@ -0,0 +1,100 @@ +extends Node2D + +@export var code_len : int = 2 +@export var ghost_tokens : int = 2 +@export var allowed_time : float = 5 +@export var starting_lives : int = 3 +@export var icon_container: HBoxContainer +@export var icons : Array[Texture] +@export var progress_bar : ProgressBar +@export var scroll_container : ScrollContainer +var current_time : float = 5 +var score : int = 0 +var lives : int = 3 +var code : Array[int] +var code_rects : Array[TextureRect] +var gaming : bool = false +var codepos : int = 0 #current position in the code to check against +var test_break : float = 1.5 +var target_scroll : float + +# start scrolling at codepos == 11 + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + #start_round() + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + target_scroll = (codepos*50) - 550 + scroll_container.scroll_horizontal = lerpf(scroll_container.scroll_horizontal,target_scroll,0.05) + + + if gaming: + current_time -= delta + progress_bar.value = (5-current_time)/allowed_time + else: + test_break -= delta + if test_break <= 0: + start_round() + if Input.is_action_just_pressed("up"): + process_input(0) + elif Input.is_action_just_pressed("right"): + process_input(1) + elif Input.is_action_just_pressed("down"): + process_input(2) + elif Input.is_action_just_pressed("left"): + process_input(3) + +func start_round(): + current_time = allowed_time + codepos = 0 + generate_code() + gaming = true + + #scroll_container.scroll_horizontal = 0 + pass + +func process_input(direction : int): + if(code[codepos] == direction): + #correct input + icon_container.get_child(codepos).modulate = Color(0,1,0) + codepos += 1 + if(codepos == code_len): + win_round() + else: + #incorrect input + codepos = 0 + #scroll_container.scroll_horizontal = 0 + for i in range(code_len): + icon_container.get_child(i).modulate = Color(1,1,1) + +func win_round(): + gaming = false + codepos = 0 + test_break = 1.5 # todo: replace with gamer samurai animation stuff + if ghost_tokens > 0: + ghost_tokens -= 1 + code_len += 1 + else: + ghost_tokens = 2 + code_len -= 1 + +func generate_code(): + code.clear() + for child in icon_container.get_children(): + child.queue_free() + for i in range(code_len): + var ran_dir : int = randi_range(0,3) + code.append(ran_dir) + var new_texture_rect : TextureRect = TextureRect.new() + new_texture_rect.texture = icons[ran_dir] + icon_container.add_child(new_texture_rect) + for i in range(ghost_tokens): + var new_texture_rect : TextureRect = TextureRect.new() + new_texture_rect.texture = icons[4] + new_texture_rect.modulate = Color(1,1,1,0.25) + icon_container.add_child(new_texture_rect) + print(code) diff --git a/logic.gd.uid b/logic.gd.uid new file mode 100644 index 0000000..2020efe --- /dev/null +++ b/logic.gd.uid @@ -0,0 +1 @@ +uid://c7c1yy0hv1u3r diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..a112044 --- /dev/null +++ b/project.godot @@ -0,0 +1,52 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="Samurai Sculpt Plus" +run/main_scene="uid://sntwtley2f7d" +config/features=PackedStringArray("4.4", "GL Compatibility") +config/icon="res://icon.svg" + +[display] + +window/stretch/mode="canvas_items" + +[input] + +up={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} +right={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} +down={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} +left={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} + +[rendering] + +renderer/rendering_method="gl_compatibility" +renderer/rendering_method.mobile="gl_compatibility"