Inital project
This commit is contained in:
13
2d_mp_base/scenes/entities/ball.gd
Normal file
13
2d_mp_base/scenes/entities/ball.gd
Normal file
@@ -0,0 +1,13 @@
|
||||
extends RigidBody3D
|
||||
|
||||
@onready var area_3d: Area3D = %Area3D
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
area_3d.body_entered.connect(_on_area_3d_body_entered)
|
||||
get_tree().create_timer(60).timeout.connect(func(): queue_free())
|
||||
|
||||
|
||||
func _on_area_3d_body_entered(body: Node3D) -> void:
|
||||
if body.is_in_group("goal"):
|
||||
queue_free()
|
||||
1
2d_mp_base/scenes/entities/ball.gd.uid
Normal file
1
2d_mp_base/scenes/entities/ball.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://crvfs5rlkh3qt
|
||||
48
2d_mp_base/scenes/entities/ball.tscn
Normal file
48
2d_mp_base/scenes/entities/ball.tscn
Normal file
@@ -0,0 +1,48 @@
|
||||
[gd_scene format=3 uid="uid://dpcnrigmslqkt"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://crvfs5rlkh3qt" path="res://scenes/entities/ball.gd" id="1_1pamd"]
|
||||
[ext_resource type="Texture2D" uid="uid://cvopdw2yahdp8" path="res://addons/kenney_prototype_textures/red/texture_01.png" id="1_u0o5v"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_u0o5v"]
|
||||
bounce = 5.0
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_1pamd"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_rlpj1"]
|
||||
albedo_texture = ExtResource("1_u0o5v")
|
||||
uv1_triplanar = true
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_wha2l"]
|
||||
material = SubResource("StandardMaterial3D_rlpj1")
|
||||
|
||||
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_u0o5v"]
|
||||
properties/0/path = NodePath(".:rotation")
|
||||
properties/0/spawn = true
|
||||
properties/0/replication_mode = 1
|
||||
properties/1/path = NodePath(".:position")
|
||||
properties/1/spawn = true
|
||||
properties/1/replication_mode = 1
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_u0o5v"]
|
||||
radius = 0.6
|
||||
|
||||
[node name="Ball" type="RigidBody3D" unique_id=799966824]
|
||||
collision_layer = 2
|
||||
collision_mask = 3
|
||||
physics_material_override = SubResource("PhysicsMaterial_u0o5v")
|
||||
script = ExtResource("1_1pamd")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1633801294]
|
||||
shape = SubResource("SphereShape3D_1pamd")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=1029757699]
|
||||
mesh = SubResource("SphereMesh_wha2l")
|
||||
|
||||
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="." unique_id=223233635]
|
||||
replication_config = SubResource("SceneReplicationConfig_u0o5v")
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="." unique_id=1926680041]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D" unique_id=1533869654]
|
||||
shape = SubResource("SphereShape3D_u0o5v")
|
||||
Reference in New Issue
Block a user