Add basic npc entity script.

This commit is contained in:
2025-01-19 21:53:28 -06:00
parent 05481adc3a
commit 163c37ffe3
18 changed files with 173 additions and 84 deletions

View File

@@ -0,0 +1,26 @@
class_name BasicNPCEntity extends "res://scripts/Entities/OverworldEntity.gd"
const Cutscene = preload("res://scripts/Cutscene/Cutscene.gd")
enum BasicNPCInteractType {
NONE,
CUTSCENE
};
@export var interactType:BasicNPCInteractType = BasicNPCInteractType.NONE;
@export var interactCutscene:Resource;
func interact(interactor:OverworldEntity) -> void:
if interactType == BasicNPCInteractType.NONE:
return
if interactType == BasicNPCInteractType.CUTSCENE:
# Cutscene in this manner must take two entities
# (self, speaker, and interactor, player)
var instance:Cutscene = interactCutscene.new(self, interactor);
getSystems().CUTSCENE.setCurrentCutscene(instance);
return
pass
func updateMovement(delta:float) -> void:
pass