diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-09-28 15:29:16 +0200 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-09-28 15:29:16 +0200 |
commit | 62e90b444315245ef24606fa51d3fccba5f18e08 (patch) | |
tree | 3a8a7390cf319d6a4ddd70bf32ca83fbe20bec31 /Target |
Diffstat (limited to 'Target')
-rw-r--r-- | Target/Assets/balloon-pop-01.wav | bin | 0 -> 7134 bytes | |||
-rw-r--r-- | Target/Assets/balloon-pop-01.wav.import | 24 | ||||
-rw-r--r-- | Target/Assets/balloon-pop-02.wav | bin | 0 -> 11598 bytes | |||
-rw-r--r-- | Target/Assets/balloon-pop-02.wav.import | 24 | ||||
-rw-r--r-- | Target/Assets/balloon-pop-03.wav | bin | 0 -> 19278 bytes | |||
-rw-r--r-- | Target/Assets/balloon-pop-03.wav.import | 24 | ||||
-rw-r--r-- | Target/Assets/balloon.kra | bin | 0 -> 41069 bytes | |||
-rw-r--r-- | Target/Assets/balloon.kra~ | bin | 0 -> 41089 bytes | |||
-rw-r--r-- | Target/Assets/balloon.png | bin | 0 -> 155 bytes | |||
-rw-r--r-- | Target/Assets/balloon.png.import | 34 | ||||
-rw-r--r-- | Target/Assets/balloon.png~ | bin | 0 -> 152 bytes | |||
-rw-r--r-- | Target/balloon.gd | 40 | ||||
-rw-r--r-- | Target/balloon.tscn | 37 | ||||
-rw-r--r-- | Target/balloon_shape.tres | 5 |
14 files changed, 188 insertions, 0 deletions
diff --git a/Target/Assets/balloon-pop-01.wav b/Target/Assets/balloon-pop-01.wav Binary files differnew file mode 100644 index 0000000..b0f3e58 --- /dev/null +++ b/Target/Assets/balloon-pop-01.wav diff --git a/Target/Assets/balloon-pop-01.wav.import b/Target/Assets/balloon-pop-01.wav.import new file mode 100644 index 0000000..50b0fc9 --- /dev/null +++ b/Target/Assets/balloon-pop-01.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://2ysaqcfxhuhc" +path="res://.godot/imported/balloon-pop-01.wav-54d644f5f16010f4ae805ba450d8b07a.sample" + +[deps] + +source_file="res://Target/Assets/balloon-pop-01.wav" +dest_files=["res://.godot/imported/balloon-pop-01.wav-54d644f5f16010f4ae805ba450d8b07a.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/Target/Assets/balloon-pop-02.wav b/Target/Assets/balloon-pop-02.wav Binary files differnew file mode 100644 index 0000000..4a3d7a6 --- /dev/null +++ b/Target/Assets/balloon-pop-02.wav diff --git a/Target/Assets/balloon-pop-02.wav.import b/Target/Assets/balloon-pop-02.wav.import new file mode 100644 index 0000000..142f6a0 --- /dev/null +++ b/Target/Assets/balloon-pop-02.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://13t4skh185gb" +path="res://.godot/imported/balloon-pop-02.wav-49b7c0363fe6daf1af7d80016db102d2.sample" + +[deps] + +source_file="res://Target/Assets/balloon-pop-02.wav" +dest_files=["res://.godot/imported/balloon-pop-02.wav-49b7c0363fe6daf1af7d80016db102d2.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/Target/Assets/balloon-pop-03.wav b/Target/Assets/balloon-pop-03.wav Binary files differnew file mode 100644 index 0000000..9ce6a80 --- /dev/null +++ b/Target/Assets/balloon-pop-03.wav diff --git a/Target/Assets/balloon-pop-03.wav.import b/Target/Assets/balloon-pop-03.wav.import new file mode 100644 index 0000000..20c9913 --- /dev/null +++ b/Target/Assets/balloon-pop-03.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://cyqg31tj3xxwv" +path="res://.godot/imported/balloon-pop-03.wav-93e3465c13f530ea62ebcb0479181009.sample" + +[deps] + +source_file="res://Target/Assets/balloon-pop-03.wav" +dest_files=["res://.godot/imported/balloon-pop-03.wav-93e3465c13f530ea62ebcb0479181009.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/Target/Assets/balloon.kra b/Target/Assets/balloon.kra Binary files differnew file mode 100644 index 0000000..a9e1a07 --- /dev/null +++ b/Target/Assets/balloon.kra diff --git a/Target/Assets/balloon.kra~ b/Target/Assets/balloon.kra~ Binary files differnew file mode 100644 index 0000000..f2050de --- /dev/null +++ b/Target/Assets/balloon.kra~ diff --git a/Target/Assets/balloon.png b/Target/Assets/balloon.png Binary files differnew file mode 100644 index 0000000..3aee4b4 --- /dev/null +++ b/Target/Assets/balloon.png diff --git a/Target/Assets/balloon.png.import b/Target/Assets/balloon.png.import new file mode 100644 index 0000000..62aa172 --- /dev/null +++ b/Target/Assets/balloon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dv84uuaxgs8fc" +path="res://.godot/imported/balloon.png-295af647cd51cb409a91fc4900f0ec1c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Target/Assets/balloon.png" +dest_files=["res://.godot/imported/balloon.png-295af647cd51cb409a91fc4900f0ec1c.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/Target/Assets/balloon.png~ b/Target/Assets/balloon.png~ Binary files differnew file mode 100644 index 0000000..cf99359 --- /dev/null +++ b/Target/Assets/balloon.png~ diff --git a/Target/balloon.gd b/Target/balloon.gd new file mode 100644 index 0000000..af7a8bd --- /dev/null +++ b/Target/balloon.gd @@ -0,0 +1,40 @@ +extends CharacterBody2D + + +func _ready(): + if OS.has_feature("mobile"): + scale = Vector2(1.5, 1.5) + + var tween = create_tween() + tween.set_loops() + tween.tween_method(func(value): + $Line2D.set_point_position(2, Vector2(value, $Line2D.points[2].y)) + , -2, 2, randf_range(0.5, 1.5)).set_delay(0.01) + tween.tween_method(func(value): + $Line2D.set_point_position(2, Vector2(value, $Line2D.points[2].y)) + , 2, -2, randf_range(0.5, 1.5)).set_delay(0.01) + tween.tween_method(func(value): + $Line2D.set_point_position(3, Vector2(value, $Line2D.points[3].y)) + , -1, 1, randf_range(0.5, 1.5)).set_delay(0.01) + tween.tween_method(func(value): + $Line2D.set_point_position(3, Vector2(value, $Line2D.points[3].y)) + , 1, -1, randf_range(0.5, 1.5)).set_delay(0.01) + + +func _process(_delta: float) -> void: + move_and_slide() + + var collision := get_last_slide_collision() + if collision: + velocity = velocity.bounce(collision.get_normal()) + + +func _on_area_2d_area_entered(area: Area2D) -> void: + if area.is_in_group("arrow"): + Game.score += 1 + SoundManager.balloon.get_children().pick_random().play() + queue_free() + + +func _on_visible_on_screen_notifier_2d_screen_exited() -> void: + queue_free() diff --git a/Target/balloon.tscn b/Target/balloon.tscn new file mode 100644 index 0000000..f967a96 --- /dev/null +++ b/Target/balloon.tscn @@ -0,0 +1,37 @@ +[gd_scene load_steps=4 format=3 uid="uid://blifc11rkfkkv"] + +[ext_resource type="Script" path="res://Target/balloon.gd" id="1_e3new"] +[ext_resource type="Texture2D" uid="uid://dv84uuaxgs8fc" path="res://Target/Assets/balloon.png" id="2_3oqak"] +[ext_resource type="Shape2D" uid="uid://da5k00qhu13tl" path="res://Target/balloon_shape.tres" id="3_d2kvr"] + +[node name="Balloon" type="CharacterBody2D"] +collision_layer = 0 +collision_mask = 8 +script = ExtResource("1_e3new") + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture_filter = 1 +texture = ExtResource("2_3oqak") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = ExtResource("3_d2kvr") + +[node name="Area2D" type="Area2D" parent="."] +collision_layer = 4 +collision_mask = 2 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +shape = ExtResource("3_d2kvr") +debug_color = Color(0.561074, 0.559604, 0, 0.42) + +[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."] +position = Vector2(4.76837e-07, 1.19209e-07) +scale = Vector2(0.6, 0.7) + +[node name="Line2D" type="Line2D" parent="."] +position = Vector2(0, -1) +points = PackedVector2Array(0, 7, -1, 10, 2, 12, 0, 15) +width = 1.0 + +[connection signal="area_entered" from="Area2D" to="." method="_on_area_2d_area_entered"] +[connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="_on_visible_on_screen_notifier_2d_screen_exited"] diff --git a/Target/balloon_shape.tres b/Target/balloon_shape.tres new file mode 100644 index 0000000..05f5dbe --- /dev/null +++ b/Target/balloon_shape.tres @@ -0,0 +1,5 @@ +[gd_resource type="CapsuleShape2D" format=3 uid="uid://da5k00qhu13tl"] + +[resource] +radius = 6.0 +height = 14.0 |