diff --git a/assets/Blocks/.xdp-SpecialBlock.png-ZQjBK6 b/assets/Blocks/.xdp-SpecialBlock.png-ZQjBK6 new file mode 100644 index 0000000..e1c9e9b Binary files /dev/null and b/assets/Blocks/.xdp-SpecialBlock.png-ZQjBK6 differ diff --git a/assets/Blocks/Block.png b/assets/Blocks/Block.png new file mode 100644 index 0000000..c719696 Binary files /dev/null and b/assets/Blocks/Block.png differ diff --git a/assets/Slider.png.import b/assets/Blocks/Block.png.import similarity index 69% rename from assets/Slider.png.import rename to assets/Blocks/Block.png.import index c7d1985..6719527 100644 --- a/assets/Slider.png.import +++ b/assets/Blocks/Block.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://dbspjkdc5q1mc" -path="res://.godot/imported/Slider.png-7121d2749dc259e03f67f754efc5d0ba.ctex" +uid="uid://cbuxv7iwn0qm7" +path="res://.godot/imported/Block.png-dcf5528a11c1628113d2eec1a93bd74f.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://assets/Slider.png" -dest_files=["res://.godot/imported/Slider.png-7121d2749dc259e03f67f754efc5d0ba.ctex"] +source_file="res://assets/Blocks/Block.png" +dest_files=["res://.godot/imported/Block.png-dcf5528a11c1628113d2eec1a93bd74f.ctex"] [params] diff --git a/assets/Blocks/Block.pxo b/assets/Blocks/Block.pxo new file mode 100644 index 0000000..bdb6d70 Binary files /dev/null and b/assets/Blocks/Block.pxo differ diff --git a/assets/Blocks/ExpandBlock.png b/assets/Blocks/ExpandBlock.png new file mode 100644 index 0000000..f62af3f Binary files /dev/null and b/assets/Blocks/ExpandBlock.png differ diff --git a/assets/RightArrow.png.import b/assets/Blocks/ExpandBlock.png.import similarity index 68% rename from assets/RightArrow.png.import rename to assets/Blocks/ExpandBlock.png.import index ce8c6f4..79aa996 100644 --- a/assets/RightArrow.png.import +++ b/assets/Blocks/ExpandBlock.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://dvhykprtl45q0" -path="res://.godot/imported/RightArrow.png-a32550768e227e9d644da82207d67585.ctex" +uid="uid://jmobplsqdy6o" +path="res://.godot/imported/ExpandBlock.png-c20e6105dd462191195e28d023c6a989.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://assets/RightArrow.png" -dest_files=["res://.godot/imported/RightArrow.png-a32550768e227e9d644da82207d67585.ctex"] +source_file="res://assets/Blocks/ExpandBlock.png" +dest_files=["res://.godot/imported/ExpandBlock.png-c20e6105dd462191195e28d023c6a989.ctex"] [params] diff --git a/assets/Blocks/ExpandBlock.pxo b/assets/Blocks/ExpandBlock.pxo new file mode 100644 index 0000000..b361254 Binary files /dev/null and b/assets/Blocks/ExpandBlock.pxo differ diff --git a/assets/Blocks/SpecialBlock.png b/assets/Blocks/SpecialBlock.png new file mode 100644 index 0000000..e1c9e9b Binary files /dev/null and b/assets/Blocks/SpecialBlock.png differ diff --git a/assets/SpeedScale.png.import b/assets/Blocks/SpecialBlock.png.import similarity index 67% rename from assets/SpeedScale.png.import rename to assets/Blocks/SpecialBlock.png.import index 6064647..76953f2 100644 --- a/assets/SpeedScale.png.import +++ b/assets/Blocks/SpecialBlock.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://blj4h34gr3s0q" -path="res://.godot/imported/SpeedScale.png-1c213110fe8f036530597123ee8887de.ctex" +uid="uid://dni2qahrw2p0k" +path="res://.godot/imported/SpecialBlock.png-2d9edbd26e098195201fe888d943ee5e.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://assets/SpeedScale.png" -dest_files=["res://.godot/imported/SpeedScale.png-1c213110fe8f036530597123ee8887de.ctex"] +source_file="res://assets/Blocks/SpecialBlock.png" +dest_files=["res://.godot/imported/SpecialBlock.png-2d9edbd26e098195201fe888d943ee5e.ctex"] [params] diff --git a/assets/Blocks/SpecialBlock.pxo b/assets/Blocks/SpecialBlock.pxo new file mode 100644 index 0000000..3a70209 Binary files /dev/null and b/assets/Blocks/SpecialBlock.pxo differ diff --git a/assets/Blocks/SpecialExpandedBlock.png b/assets/Blocks/SpecialExpandedBlock.png new file mode 100644 index 0000000..4525c7d Binary files /dev/null and b/assets/Blocks/SpecialExpandedBlock.png differ diff --git a/assets/Blocks/SpecialExpandedBlock.png.import b/assets/Blocks/SpecialExpandedBlock.png.import new file mode 100644 index 0000000..31ede19 --- /dev/null +++ b/assets/Blocks/SpecialExpandedBlock.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://13wfksnp806p" +path="res://.godot/imported/SpecialExpandedBlock.png-fbf379fd3cb609cf5368abeca92c5a89.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/Blocks/SpecialExpandedBlock.png" +dest_files=["res://.godot/imported/SpecialExpandedBlock.png-fbf379fd3cb609cf5368abeca92c5a89.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/assets/Blocks/SpecialExpandedBlock.pxo b/assets/Blocks/SpecialExpandedBlock.pxo new file mode 100644 index 0000000..4449f57 Binary files /dev/null and b/assets/Blocks/SpecialExpandedBlock.pxo differ diff --git a/assets/Slider.png b/assets/Slider.png deleted file mode 100644 index 8666b46..0000000 Binary files a/assets/Slider.png and /dev/null differ diff --git a/assets/Slider.pxo b/assets/Slider.pxo deleted file mode 100644 index da98ab6..0000000 Binary files a/assets/Slider.pxo and /dev/null differ diff --git a/assets/SpeedScale.png b/assets/SpeedScale.png deleted file mode 100644 index cd6962f..0000000 Binary files a/assets/SpeedScale.png and /dev/null differ diff --git a/assets/SpeedScale.pxo b/assets/SpeedScale.pxo deleted file mode 100644 index ecfadfc..0000000 Binary files a/assets/SpeedScale.pxo and /dev/null differ diff --git a/project.godot b/project.godot index 4f3363a..af1a3f6 100644 --- a/project.godot +++ b/project.godot @@ -28,7 +28,7 @@ GLOBAL="*res://scenes/Globals/global.gd" window/size/viewport_width=1080 window/size/viewport_height=1280 -window/stretch/mode="viewport" +window/stretch/mode="canvas_items" window/stretch/aspect="expand" window/handheld/orientation=1 diff --git a/scenes/Blocks/block.gd b/scenes/Blocks/block.gd index a78ca0d..3556923 100644 --- a/scenes/Blocks/block.gd +++ b/scenes/Blocks/block.gd @@ -5,6 +5,11 @@ extends Area2D @onready var raycastRight = $RaycastRight @onready var raycastTop = $RaycastTop +@onready var spriteBlock = $Block +@onready var spriteSpecialBlock = $SpecialBlock +@onready var spriteExpandBlock = $ExpandBlock +@onready var spriteSpecialExpandedBlock = $SpecialExpandedBlock + @export var UID = 1 var secretPosition = Vector2() @@ -56,3 +61,16 @@ func moveLeft(): move(-64, 0) func moveRight(): move(64, 0) + +func setlook(): + match type: + GLOBAL.BLOCKTYPES.LIGHT: + if expand: + spriteExpandBlock.show() + else: + spriteBlock.show() + GLOBAL.BLOCKTYPES.HEAVY: + if expand: + spriteSpecialExpandedBlock.show() + else: + spriteSpecialBlock.show() diff --git a/scenes/Blocks/block.tscn b/scenes/Blocks/block.tscn index 54609b9..b990606 100644 --- a/scenes/Blocks/block.tscn +++ b/scenes/Blocks/block.tscn @@ -1,6 +1,10 @@ -[gd_scene load_steps=5 format=3 uid="uid://do8gr42oq2a0y"] +[gd_scene load_steps=9 format=3 uid="uid://do8gr42oq2a0y"] [ext_resource type="Script" path="res://scenes/Blocks/block.gd" id="1_t1hpt"] +[ext_resource type="Texture2D" uid="uid://cbuxv7iwn0qm7" path="res://assets/Blocks/Block.png" id="2_dyhpk"] +[ext_resource type="Texture2D" uid="uid://dni2qahrw2p0k" path="res://assets/Blocks/SpecialBlock.png" id="3_do2c5"] +[ext_resource type="Texture2D" uid="uid://jmobplsqdy6o" path="res://assets/Blocks/ExpandBlock.png" id="4_c0a60"] +[ext_resource type="Texture2D" uid="uid://13wfksnp806p" path="res://assets/Blocks/SpecialExpandedBlock.png" id="5_nea42"] [sub_resource type="QuadMesh" id="QuadMesh_lsuac"] @@ -16,6 +20,7 @@ collision_mask = 14 script = ExtResource("1_t1hpt") [node name="MeshInstance2D" type="MeshInstance2D" parent="."] +visible = false position = Vector2(31, 31) scale = Vector2(62, 62) mesh = SubResource("QuadMesh_lsuac") @@ -58,3 +63,23 @@ collision_layer = 16 [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] position = Vector2(32, 32) shape = SubResource("RectangleShape2D_ti23g") + +[node name="Block" type="Sprite2D" parent="."] +visible = false +position = Vector2(32, 32) +texture = ExtResource("2_dyhpk") + +[node name="SpecialBlock" type="Sprite2D" parent="."] +visible = false +position = Vector2(32, 32) +texture = ExtResource("3_do2c5") + +[node name="ExpandBlock" type="Sprite2D" parent="."] +visible = false +position = Vector2(32, 32) +texture = ExtResource("4_c0a60") + +[node name="SpecialExpandedBlock" type="Sprite2D" parent="."] +visible = false +position = Vector2(32, 32) +texture = ExtResource("5_nea42") diff --git a/scenes/Grid/grid.gd b/scenes/Grid/grid.gd index 410da87..050f0ef 100644 --- a/scenes/Grid/grid.gd +++ b/scenes/Grid/grid.gd @@ -175,6 +175,7 @@ func PlacePattern(): if i.turningPoint: block.turningPoint = true blocks.add_child(block) + block.setlook() func getNewPatterns():