diff --git a/assets/ball.png b/assets/ball.png new file mode 100644 index 0000000..9f54a2d Binary files /dev/null and b/assets/ball.png differ diff --git a/assets/ball.png.import b/assets/ball.png.import new file mode 100644 index 0000000..b7391a9 --- /dev/null +++ b/assets/ball.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://8gw5knpb4bx6" +path="res://.godot/imported/ball.png-ca93c4f2e7b7f8325cbd933673092ff4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ball.png" +dest_files=["res://.godot/imported/ball.png-ca93c4f2e7b7f8325cbd933673092ff4.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/ball.pxo b/assets/ball.pxo new file mode 100644 index 0000000..31328c9 Binary files /dev/null and b/assets/ball.pxo differ diff --git a/assets/playground.png b/assets/playground.png new file mode 100644 index 0000000..b5d9cb1 Binary files /dev/null and b/assets/playground.png differ diff --git a/assets/playground.png.import b/assets/playground.png.import new file mode 100644 index 0000000..5392d0d --- /dev/null +++ b/assets/playground.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cf7xqjtabmist" +path="res://.godot/imported/playground.png-05666ff42c52bede102a281cb27344a5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/playground.png" +dest_files=["res://.godot/imported/playground.png-05666ff42c52bede102a281cb27344a5.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/playground.pxo b/assets/playground.pxo new file mode 100644 index 0000000..eebd594 Binary files /dev/null and b/assets/playground.pxo differ diff --git a/assets/racket.png b/assets/racket.png new file mode 100644 index 0000000..089df81 Binary files /dev/null and b/assets/racket.png differ diff --git a/assets/racket.png.import b/assets/racket.png.import new file mode 100644 index 0000000..6b8f216 --- /dev/null +++ b/assets/racket.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cc71lbhjc1wl5" +path="res://.godot/imported/racket.png-7c12b76a02ebef4e92c8b0fa0ceaf5bf.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/racket.png" +dest_files=["res://.godot/imported/racket.png-7c12b76a02ebef4e92c8b0fa0ceaf5bf.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/racket.pxo b/assets/racket.pxo new file mode 100644 index 0000000..c3647f3 Binary files /dev/null and b/assets/racket.pxo differ diff --git a/scenes/playground/Playground.tscn b/scenes/playground/Playground.tscn index 8bb59a5..da014cb 100644 --- a/scenes/playground/Playground.tscn +++ b/scenes/playground/Playground.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=6 format=3 uid="uid://catrpx1vuhvou"] +[gd_scene load_steps=7 format=3 uid="uid://catrpx1vuhvou"] [ext_resource type="Script" path="res://scenes/playground/Playground.gd" id="1_86x6h"] [ext_resource type="PackedScene" uid="uid://ce4mnfokb6pkn" path="res://scenes/playground/racket/Racket.tscn" id="1_ywul3"] +[ext_resource type="Texture2D" uid="uid://cf7xqjtabmist" path="res://assets/playground.png" id="2_5bwsm"] [sub_resource type="PhysicsMaterial" id="PhysicsMaterial_v2vae"] friction = 0.0 @@ -24,6 +25,11 @@ physics_material_override = SubResource("PhysicsMaterial_v2vae") polygon = PackedVector2Array(0, 8, 0, 600, 1200, 600, 1200, 8, 0, 0, 0, 8, 1192, 16, 1192, 16, 1192, 592, 8, 592, 8, 16) one_way_collision_margin = 0.0 +[node name="TextureRect" type="TextureRect" parent="Wall"] +offset_right = 40.0 +offset_bottom = 40.0 +texture = ExtResource("2_5bwsm") + [node name="GoalAreaLeft" type="Area2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="GoalAreaLeft"] @@ -59,9 +65,9 @@ metadata/UP_KEY = "right_up" metadata/DOWN_KEY = "right_down" [node name="Score" type="Label" parent="."] -offset_left = 544.0 +offset_left = 534.0 offset_top = 32.0 -offset_right = 673.0 +offset_right = 663.0 offset_bottom = 120.0 text = "0 - 0" label_settings = SubResource("LabelSettings_ildlg") diff --git a/scenes/playground/ball/Ball.tscn b/scenes/playground/ball/Ball.tscn index 5e77535..f2b39c9 100644 --- a/scenes/playground/ball/Ball.tscn +++ b/scenes/playground/ball/Ball.tscn @@ -1,12 +1,13 @@ -[gd_scene load_steps=4 format=3 uid="uid://dmsd30hc2ob1w"] +[gd_scene load_steps=5 format=3 uid="uid://dmsd30hc2ob1w"] [ext_resource type="Script" path="res://scenes/playground/ball/Ball.gd" id="1_vsr7q"] +[ext_resource type="Texture2D" uid="uid://8gw5knpb4bx6" path="res://assets/ball.png" id="2_efxb4"] [sub_resource type="PhysicsMaterial" id="PhysicsMaterial_h7mi1"] friction = 0.0 -[sub_resource type="RectangleShape2D" id="RectangleShape2D_bdxrg"] -size = Vector2(32, 32) +[sub_resource type="CircleShape2D" id="CircleShape2D_8ps5q"] +radius = 20.0 [node name="Ball" type="RigidBody2D"] mass = 0.01 @@ -20,12 +21,13 @@ contact_monitor = true linear_damp_mode = 1 script = ExtResource("1_vsr7q") -[node name="ColorRect" type="ColorRect" parent="."] -offset_right = 40.0 -offset_bottom = 40.0 - [node name="CollisionShape2D" type="CollisionShape2D" parent="."] position = Vector2(20, 20) -shape = SubResource("RectangleShape2D_bdxrg") +shape = SubResource("CircleShape2D_8ps5q") + +[node name="TextureRect" type="TextureRect" parent="."] +offset_right = 40.0 +offset_bottom = 40.0 +texture = ExtResource("2_efxb4") [connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/scenes/playground/racket/Racket.gd b/scenes/playground/racket/Racket.gd index 06af9e5..96e69bb 100644 --- a/scenes/playground/racket/Racket.gd +++ b/scenes/playground/racket/Racket.gd @@ -1,7 +1,7 @@ extends RigidBody2D -const SPEED = 500.0 +const SPEED = 800.0 func _physics_process(delta): if Input.is_action_pressed(get_meta("UP_KEY")): diff --git a/scenes/playground/racket/Racket.tscn b/scenes/playground/racket/Racket.tscn index b53108e..b89ab02 100644 --- a/scenes/playground/racket/Racket.tscn +++ b/scenes/playground/racket/Racket.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=4 format=3 uid="uid://ce4mnfokb6pkn"] +[gd_scene load_steps=5 format=3 uid="uid://ce4mnfokb6pkn"] [ext_resource type="Script" path="res://scenes/playground/racket/Racket.gd" id="1_gclos"] +[ext_resource type="Texture2D" uid="uid://cc71lbhjc1wl5" path="res://assets/racket.png" id="2_7620b"] [sub_resource type="PhysicsMaterial" id="PhysicsMaterial_lq6ot"] friction = 0.0 @@ -19,7 +20,7 @@ script = ExtResource("1_gclos") position = Vector2(20, 72) shape = SubResource("RectangleShape2D_ehve4") -[node name="ColorRect" type="ColorRect" parent="."] +[node name="TextureRect" type="TextureRect" parent="."] offset_right = 40.0 offset_bottom = 144.0 -color = Color(0.0117647, 0.0117647, 0.0117647, 1) +texture = ExtResource("2_7620b")