Added first round of graphics

This commit is contained in:
2024-05-04 22:41:29 +01:00
parent 1b7e75a3bc
commit 28e1cdb2cb
26 changed files with 627 additions and 59 deletions
+4
View File
@@ -12,6 +12,8 @@ var capture_object : Node2D
var capture_offset : Vector2 = Vector2.ZERO
func _physics_process(delta: float) -> void:
angular_velocity = 0
rotation = 0
if captured:
PhysicsServer2D.body_set_state(
get_rid(),
@@ -27,6 +29,8 @@ func _physics_process(delta: float) -> void:
func _on_body_entered(body: Node) -> void:
if body is Brick:
if not body.visible:
return
#linear_velocity = (linear_velocity.normalized() + (Vector2(randf() - 0.5, randf() - 0.5) / 2.0)).normalized() * linear_velocity.length()
$BrickSound.play()
body.hit()
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://wye1kea3ts48"
path="res://.godot/imported/Ball.png-586f401d09fe0752614fb4e34d1b45f6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Ball/Ball.png"
dest_files=["res://.godot/imported/Ball.png-586f401d09fe0752614fb4e34d1b45f6.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
+9 -3
View File
@@ -1,6 +1,7 @@
[gd_scene load_steps=7 format=3 uid="uid://clfo2nrropg8y"]
[gd_scene load_steps=8 format=3 uid="uid://clfo2nrropg8y"]
[ext_resource type="Script" path="res://Ball/Ball.gd" id="1_2xu4j"]
[ext_resource type="Texture2D" uid="uid://wye1kea3ts48" path="res://Ball/Ball.png" id="2_cpnep"]
[ext_resource type="AudioStream" uid="uid://7kjt62y3t8lc" path="res://Sounds/WallHit.wav" id="3_bwkax"]
[ext_resource type="AudioStream" uid="uid://b6vosap1la1ts" path="res://Sounds/BrickHit.wav" id="4_ly8mo"]
[ext_resource type="AudioStream" uid="uid://d3g30x1n2ncjj" path="res://Sounds/PaddleHit.wav" id="5_f8nt3"]
@@ -13,6 +14,7 @@ bounce = 1.0
radius = 3.0
[node name="Ball" type="RigidBody2D"]
collision_layer = 0
physics_material_override = SubResource("PhysicsMaterial_tqihs")
gravity_scale = 0.0
continuous_cd = 1
@@ -20,8 +22,12 @@ max_contacts_reported = 5
contact_monitor = true
script = ExtResource("1_2xu4j")
[node name="Polygon2D" type="Polygon2D" parent="."]
polygon = PackedVector2Array(-3, -3, 3, -3, 3, 3, -3, 3)
[node name="TextureRect" type="TextureRect" parent="."]
offset_left = -3.0
offset_top = -3.0
offset_right = 3.0
offset_bottom = 3.0
texture = ExtResource("2_cpnep")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_nwcsc")