diff --git a/ArrowGirl/ArrowGirl.gd b/ArrowGirl/ArrowGirl.gd new file mode 100644 index 0000000..8775244 --- /dev/null +++ b/ArrowGirl/ArrowGirl.gd @@ -0,0 +1,14 @@ +class_name ArrowGirl extends Area2D + +@onready var _sprite = $AnimatedSprite2D + +#boilerplate +func _ready(): + _sprite.play("idle", 1) + +#animation stuff +func _on_animation_finished() -> void: + if randf() < 0.2: + _sprite.play("idle_glance", 2) + else: + _sprite.play("idle", 2) diff --git a/ArrowGirl/ArrowGirl.gd.uid b/ArrowGirl/ArrowGirl.gd.uid new file mode 100644 index 0000000..1499f9d --- /dev/null +++ b/ArrowGirl/ArrowGirl.gd.uid @@ -0,0 +1 @@ +uid://dqnhd2oej7xbw diff --git a/ArrowGirl/ArrowGirl.png b/ArrowGirl/ArrowGirl.png new file mode 100644 index 0000000..d3f698a Binary files /dev/null and b/ArrowGirl/ArrowGirl.png differ diff --git a/ArrowGirl/ArrowGirl.png.import b/ArrowGirl/ArrowGirl.png.import new file mode 100644 index 0000000..4237e29 --- /dev/null +++ b/ArrowGirl/ArrowGirl.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dvuvwdk6nr4nb" +path="res://.godot/imported/ArrowGirl.png-d4d75df81e356cd6ff3873d27dc6b64f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ArrowGirl/ArrowGirl.png" +dest_files=["res://.godot/imported/ArrowGirl.png-d4d75df81e356cd6ff3873d27dc6b64f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +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/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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/ArrowGirl/ArrowGirl.tscn b/ArrowGirl/ArrowGirl.tscn new file mode 100644 index 0000000..bae56e7 --- /dev/null +++ b/ArrowGirl/ArrowGirl.tscn @@ -0,0 +1,55 @@ +[gd_scene format=3 uid="uid://cn8srrkyt4h8e"] + +[ext_resource type="Texture2D" uid="uid://dvuvwdk6nr4nb" path="res://ArrowGirl/ArrowGirl.png" id="1_5i1ac"] +[ext_resource type="Script" uid="uid://dqnhd2oej7xbw" path="res://ArrowGirl/ArrowGirl.gd" id="1_53v1e"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_y2354"] +atlas = ExtResource("1_5i1ac") +region = Rect2(0, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ni31j"] +atlas = ExtResource("1_5i1ac") +region = Rect2(0, 0, 32, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xlvrw"] +atlas = ExtResource("1_5i1ac") +region = Rect2(32, 0, 32, 32) + +[sub_resource type="SpriteFrames" id="SpriteFrames_73fnb"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_y2354") +}], +"loop": false, +"name": &"idle", +"speed": 1.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_ni31j") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xlvrw") +}], +"loop": false, +"name": &"idle_glance", +"speed": 1.0 +}] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_53v1e"] +size = Vector2(32, 32) + +[node name="ArrowGirl" type="Area2D" unique_id=869288979] +script = ExtResource("1_53v1e") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=1672878033] +sprite_frames = SubResource("SpriteFrames_73fnb") +animation = &"idle_glance" +metadata/_edit_lock_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1190138841] +shape = SubResource("RectangleShape2D_53v1e") +metadata/_edit_lock_ = true + +[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animation_finished"] diff --git a/ArrowGirl/ArrowGirl.xcf b/ArrowGirl/ArrowGirl.xcf new file mode 100644 index 0000000..8274cc1 Binary files /dev/null and b/ArrowGirl/ArrowGirl.xcf differ diff --git a/BoxBoy/BoxBoy.gd b/BoxBoy/BoxBoy.gd index 44c23d7..bfd7126 100644 --- a/BoxBoy/BoxBoy.gd +++ b/BoxBoy/BoxBoy.gd @@ -40,7 +40,7 @@ func _physics_process(_delta) -> void: buffer_jumping -= 1 #process coyote and jump buffers - if buffer_grounded > 0 and buffer_jumping > 0: + if buffer_grounded > 0 and buffer_jumping > 0 and just_bounced == false: velocity.y = -JUMP_FORCE buffer_grounded = 0 buffer_jumping = 0 diff --git a/BoxBoy/BoxBoy.tscn b/BoxBoy/BoxBoy.tscn index 59d32b9..c815581 100644 --- a/BoxBoy/BoxBoy.tscn +++ b/BoxBoy/BoxBoy.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=3 uid="uid://dndbf44fkm2ww"] +[gd_scene format=3 uid="uid://dndbf44fkm2ww"] [ext_resource type="Script" uid="uid://c2x51mppxugpn" path="res://BoxBoy/BoxBoy.gd" id="1_av86f"] [ext_resource type="Texture2D" uid="uid://bpjhq0b2dae1d" path="res://BoxBoy/BoxBoy.png" id="2_0yqgk"] @@ -34,15 +34,15 @@ animations = [{ radius = 14.0 height = 32.0 -[node name="BoxBoy" type="CharacterBody2D"] +[node name="BoxBoy" type="CharacterBody2D" unique_id=904940283] script = ExtResource("1_av86f") -[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=660463739] sprite_frames = SubResource("SpriteFrames_y2354") animation = &"idle" metadata/_edit_lock_ = true -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1250358515] shape = SubResource("CapsuleShape2D_ulcgi") metadata/_edit_lock_ = true diff --git a/BoxBoy/boxboy.xcf b/BoxBoy/BoxBoy.xcf similarity index 100% rename from BoxBoy/boxboy.xcf rename to BoxBoy/BoxBoy.xcf diff --git a/scene.tscn b/Scene.tscn similarity index 97% rename from scene.tscn rename to Scene.tscn index aa5946a..43e9d0f 100644 --- a/scene.tscn +++ b/Scene.tscn @@ -3,6 +3,7 @@ [ext_resource type="Texture2D" uid="uid://ddl0kxl0inw6r" path="res://Tileset/atlas.png" id="1_3253y"] [ext_resource type="Script" uid="uid://b4nlbrxto0tjp" path="res://Controllers/GameplayController.gd" id="1_u3cyc"] [ext_resource type="PackedScene" uid="uid://dndbf44fkm2ww" path="res://BoxBoy/BoxBoy.tscn" id="2_3253y"] +[ext_resource type="PackedScene" uid="uid://cn8srrkyt4h8e" path="res://ArrowGirl/ArrowGirl.tscn" id="4_m7jmp"] [ext_resource type="PackedScene" uid="uid://b1hpr05b5sgww" path="res://Bouncy/Bouncy.tscn" id="4_u3cyc"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_u3cyc"] @@ -58,3 +59,8 @@ position = Vector2(1584, -576) [node name="Bouncy6" parent="BouncyContainer" unique_id=2085472449 instance=ExtResource("4_u3cyc")] position = Vector2(1680, -896) + +[node name="NPCContainer" type="Node" parent="." unique_id=1127671677] + +[node name="ArrowGirl" parent="NPCContainer" unique_id=869288979 instance=ExtResource("4_m7jmp")] +position = Vector2(-24, 48) diff --git a/project.godot b/project.godot index 043c351..d112414 100644 --- a/project.godot +++ b/project.godot @@ -15,7 +15,7 @@ compatibility/default_parent_skeleton_in_mesh_instance_3d=true [application] config/name="colorvania" -run/main_scene="res://scene.tscn" +run/main_scene="res://Scene.tscn" config/features=PackedStringArray("4.6", "Forward Plus") config/icon="res://icon.svg"