initial commit
This commit is contained in:
commit
c2bb3893a9
1038 changed files with 75846 additions and 0 deletions
19
elements/entities/player_start/player_start.gd
Normal file
19
elements/entities/player_start/player_start.gd
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
extends Node3D
|
||||
## Point entity marker that spawns the player actor at its position when the
|
||||
## map finishes loading. The marker removes itself after spawning.
|
||||
|
||||
@export var actor_scene: PackedScene = preload("res://elements/actor/actor.tscn")
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
# Wait one frame so func_godot has finished setting our global_transform
|
||||
# from the map file before we read it.
|
||||
await get_tree().process_frame
|
||||
|
||||
var actor: Node3D = actor_scene.instantiate()
|
||||
get_tree().current_scene.add_child(actor)
|
||||
|
||||
actor.global_transform = global_transform
|
||||
actor.position = Grid.snap(actor.position)
|
||||
|
||||
queue_free()
|
||||
1
elements/entities/player_start/player_start.gd.uid
Normal file
1
elements/entities/player_start/player_start.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://u4co4qsh7m30
|
||||
6
elements/entities/player_start/player_start.tscn
Normal file
6
elements/entities/player_start/player_start.tscn
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://dplyrstartscn1"]
|
||||
|
||||
[ext_resource type="Script" path="res://elements/entities/player_start/player_start.gd" id="1_script"]
|
||||
|
||||
[node name="PlayerStart" type="Node3D"]
|
||||
script = ExtResource("1_script")
|
||||
Loading…
Add table
Add a link
Reference in a new issue