Godot 3d tutorial: https://docs.godotengine.org/en/stable/getting_started/first_3d_game/07.killing_player.html
This commit is contained in:
14
main.gd
Normal file
14
main.gd
Normal file
@@ -0,0 +1,14 @@
|
||||
extends Node
|
||||
|
||||
@export var mob_scene: PackedScene
|
||||
|
||||
func _on_mob_timer_timeout():
|
||||
var mob = mob_scene.instantiate()
|
||||
|
||||
var mob_spawn_location = get_node("SpawnPath/SpawnLocation")
|
||||
mob_spawn_location.progress_ratio = randf()
|
||||
|
||||
var player_position = $Player.position
|
||||
mob.initialize(mob_spawn_location.position, player_position)
|
||||
|
||||
add_child(mob)
|
||||
Reference in New Issue
Block a user