Most of prototype! yay

This commit is contained in:
2025-05-01 08:27:30 -05:00
parent 11605c9f17
commit 30bf202118
51 changed files with 1906 additions and 52 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 583 B

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://m8ophji4p35i"
path="res://.godot/imported/button.aseprite.png-65b0b5c35c3c69ebe0561afd09528d1a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/button/button.aseprite.png"
dest_files=["res://.godot/imported/button.aseprite.png-65b0b5c35c3c69ebe0561afd09528d1a.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

11
entities/button/button.gd Normal file
View File

@@ -0,0 +1,11 @@
extends Interactable
@onready var sprite_2d: AnimatedSprite2D = $Sprite2D
func _on_interaction_area_body_entered(body: Player) -> void:
sprite_2d.frame += 1
func _on_interaction_area_body_exited(body: Player) -> void:
sprite_2d.frame -= 1
func interact(player: Player):
sprite_2d.frame += 2

View File

@@ -0,0 +1 @@
uid://ba287kjc4mtb2

View File

@@ -1,17 +1,35 @@
[gd_scene load_steps=3 format=3 uid="uid://q3f3j7p3t43w"]
[gd_scene load_steps=6 format=3 uid="uid://q3f3j7p3t43w"]
[ext_resource type="SpriteFrames" uid="uid://b31mdngbhms7k" path="res://entities/button/button.aseprite" id="1_4tlb3"]
[ext_resource type="Script" uid="uid://ba287kjc4mtb2" path="res://entities/button/button.gd" id="1_7gf2j"]
[ext_resource type="SpriteFrames" uid="uid://b31mdngbhms7k" path="res://entities/button/button.aseprite" id="2_7gf2j"]
[ext_resource type="Script" uid="uid://dryjau28sybgd" path="res://common/interactable_body.gd" id="3_6bgj0"]
[sub_resource type="CircleShape2D" id="CircleShape2D_4tlb3"]
radius = 32.0
[sub_resource type="CircleShape2D" id="CircleShape2D_7gf2j"]
radius = 13.0
[node name="Button" type="Node2D"]
script = ExtResource("1_7gf2j")
metadata/_custom_type_script = "uid://csbip0oj1uu0j"
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = ExtResource("1_4tlb3")
[node name="InteractionArea" type="Area2D" parent="."]
collision_layer = 16
collision_mask = 16
[node name="CollisionShape2D" type="CollisionShape2D" parent="InteractionArea"]
shape = SubResource("CircleShape2D_4tlb3")
[node name="Sprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = ExtResource("2_7gf2j")
animation = &"Press"
[node name="Area2D" type="Area2D" parent="."]
[node name="StaticBody2D" type="StaticBody2D" parent="."]
script = ExtResource("3_6bgj0")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource("CircleShape2D_4tlb3")
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
shape = SubResource("CircleShape2D_7gf2j")
[connection signal="body_entered" from="InteractionArea" to="." method="_on_interaction_area_body_entered"]
[connection signal="body_exited" from="InteractionArea" to="." method="_on_interaction_area_body_exited"]