Added the World Added Mobs, and spawning those mobs at runtime Added simple camera movement Added simple UI/HUD
18 lines
344 B
GDScript
18 lines
344 B
GDScript
extends Node
|
|
|
|
const FlyScene = preload("res://scenes/entities/fly/fly.tscn")
|
|
|
|
func spawn_entity(entity_scene, position):
|
|
# Instance the scene
|
|
var entity = entity_scene.instantiate()
|
|
|
|
if entity is Node2D:
|
|
entity.position = position
|
|
|
|
add_child(entity)
|
|
|
|
return entity
|
|
|
|
func spawn_fly(position):
|
|
return spawn_entity(FlyScene, position)
|