Forgot to add some things

remotes/1705382094874458415/tmp_refs/heads/godot4-port
Jan 2020-06-19 01:30:53 +02:00
parent 03f16038f8
commit 5a673ba0af
4 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,4 @@
extends Spatial
func on_player_enters(player):
player.rpc("kill")

View File

@ -0,0 +1,13 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://LevelComponents/Killfloor.gd" type="Script" id=1]
[sub_resource type="BoxShape" id=1]
extents = Vector3( 100, 1, 100 )
[node name="Killfloor" type="Area"]
script = ExtResource( 1 )
[node name="CollisionShape" type="CollisionShape" parent="."]
shape = SubResource( 1 )
[connection signal="body_entered" from="." to="." method="on_player_enters"]

View File

@ -0,0 +1,5 @@
extends Spatial
func spawn(player):
player.translation = player.get_parent().to_local(global_transform.origin)
player.velocity = Vector3()

View File

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://LevelComponents/SpawnPoint.gd" type="Script" id=1]
[node name="SpawnPoint" type="Spatial"]
script = ExtResource( 1 )