From 29aac6edf2eb4833070bcb889aed29664262d3b4 Mon Sep 17 00:00:00 2001 From: yuki Date: Thu, 13 Nov 2025 09:01:56 -0300 Subject: [PATCH] add ball --- Main.tscn | 6 +++++- scenes/ball/ball.ase | Bin 0 -> 649 bytes scenes/ball/ball.png | Bin 0 -> 316 bytes scenes/ball/ball.png.import | 40 ++++++++++++++++++++++++++++++++++++ scenes/ball/ball.tscn | 22 ++++++++++++++++++++ 5 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 scenes/ball/ball.ase create mode 100644 scenes/ball/ball.png create mode 100644 scenes/ball/ball.png.import create mode 100644 scenes/ball/ball.tscn diff --git a/Main.tscn b/Main.tscn index 4b5e8cf..5cb2a0e 100644 --- a/Main.tscn +++ b/Main.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=3 format=4 uid="uid://d3c6aioatcy20"] +[gd_scene load_steps=4 format=4 uid="uid://d3c6aioatcy20"] [ext_resource type="TileSet" uid="uid://doja61ouvb77l" path="res://resources/tilesets/level.tres" id="1_uu6xs"] [ext_resource type="PackedScene" uid="uid://642nm6c4mpxx" path="res://scenes/player/player.tscn" id="2_r0du0"] +[ext_resource type="PackedScene" uid="uid://cmgwv41ht3q4j" path="res://scenes/ball/ball.tscn" id="3_r0du0"] [node name="Main" type="Node"] @@ -18,3 +19,6 @@ metadata/_edit_lock_ = true [node name="Player" parent="." instance=ExtResource("2_r0du0")] position = Vector2(148, 105) + +[node name="Ball" parent="." instance=ExtResource("3_r0du0")] +position = Vector2(193, 130) diff --git a/scenes/ball/ball.ase b/scenes/ball/ball.ase new file mode 100644 index 0000000000000000000000000000000000000000..2f456ff7b8ad44dc37e8ce9d4fa582a75f9027da GIT binary patch literal 649 zcmeBVVqkc%l#xLI2ss!S85kH+fEWT4fs`tYLnE3KX#cN|EO1+Y0PT@ffZ3{o#a0zz zhW`uJ>OZq=5tnkhB(N z1Cs8d>_9R=K>$c5Xn@E}Gmx1K>_R}2PgEXA%A5NDNmb`$AgSYB10)RsJAkBR@IoNz zAF~WdGVt>PNe(G-ASvKz3?xOu-GQV;K1i2TRUVL3oHPkY+AUZOB>w{e1H&0jO(1Ea zc?Kl%?c4uKpg}C4@CSJv=tZFafSv>T4CpPOpMV|$`UdC~pg(|~0Qvyve4yKb4hOm# z=wzUKfsO^b6zEK#8-Wf4x(?_xpu2#M0=fw39H3i(4gtC1|9_zUAj`jflLuL>zzif| z0O%qHb_Sos%G4qS!%QHDRRJRP9~f5<07@+tb6Wcy`4|*An9tiZAN{{S&?@XvZuNvR zr>3(xtX|rWoYnjUj+!o5`-!!vi|zPFt{ZbcnlFBJ_kG3zMx}<|eM~hQ-1G{*&u_b2 K&aA#g#uWgw43`K1 literal 0 HcmV?d00001 diff --git a/scenes/ball/ball.png b/scenes/ball/ball.png new file mode 100644 index 0000000000000000000000000000000000000000..99721f49ca43e889a36036ab3dade16de233116b GIT binary patch literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}et=JiE09(ZW{9$ps0fnnPg7k| zX}GOL|NH`%tDB-kSQ!*J7z`vhtcBU!McD%s1QIj^GR-6y*oF8+<>k$NRGpJ`ylV^s zJ1m12`o}C|;OFI#5*KhZ772Hk$WNB4%2S*)$!@{w|NsA=(bP22JoEqCH?9WvLqIE4 zOM?7@8GsUa0Z2jF4Dl|YhHy_8#}J9BrRNXw9#G(6K2T%J#{2vHjT?m%DkivZ^mkI- zXmLTK?bUKY(H&hJH{7+j+-8JbxqfM7$C1TR?rT=GoO ey0~|7|Ji@b$+&K>n|~i@1%s!npUXO@geCw6(t!Q| literal 0 HcmV?d00001 diff --git a/scenes/ball/ball.png.import b/scenes/ball/ball.png.import new file mode 100644 index 0000000..5b0acc4 --- /dev/null +++ b/scenes/ball/ball.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c44hadxh2458n" +path="res://.godot/imported/ball.png-20bc590ed01e3c3d037babb65682d093.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/ball/ball.png" +dest_files=["res://.godot/imported/ball.png-20bc590ed01e3c3d037babb65682d093.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/scenes/ball/ball.tscn b/scenes/ball/ball.tscn new file mode 100644 index 0000000..3ba1c29 --- /dev/null +++ b/scenes/ball/ball.tscn @@ -0,0 +1,22 @@ +[gd_scene load_steps=4 format=3 uid="uid://cmgwv41ht3q4j"] + +[ext_resource type="Texture2D" uid="uid://c44hadxh2458n" path="res://scenes/ball/ball.png" id="1_oqv3d"] + +[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_oqv3d"] +friction = 0.0 +bounce = 0.3 + +[sub_resource type="CircleShape2D" id="CircleShape2D_nv6q1"] +radius = 8.062258 + +[node name="Ball" type="RigidBody2D"] +collision_layer = 2 +collision_mask = 5 +physics_material_override = SubResource("PhysicsMaterial_oqv3d") +continuous_cd = 1 + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("1_oqv3d") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("CircleShape2D_nv6q1")