Example conversation.
This commit is contained in:
@@ -36,6 +36,20 @@ func getDirectionVector() -> Vector3:
|
||||
Direction.EAST:
|
||||
return Vector3(1, 0, 0);
|
||||
return Vector3(0, 0, 0);
|
||||
|
||||
func getDirectionToFace(position:Vector3) -> Direction:
|
||||
var diff = position - self.position;
|
||||
if abs(diff.x) > abs(diff.z):
|
||||
if diff.x > 0:
|
||||
return Direction.EAST;
|
||||
else:
|
||||
return Direction.WEST;
|
||||
else:
|
||||
if diff.z > 0:
|
||||
return Direction.SOUTH;
|
||||
else:
|
||||
return Direction.NORTH;
|
||||
return Direction.SOUTH;
|
||||
|
||||
# Virtual Methods
|
||||
func updateMovement(delta) -> void:
|
||||
@@ -54,12 +68,12 @@ func isPaused() -> bool:
|
||||
return true;
|
||||
elif ps == PauseSystem.PauseType.ENTITY_PAUSED:
|
||||
if pause.entities.find(self) != -1:
|
||||
return false;
|
||||
return true
|
||||
return true;
|
||||
return false
|
||||
elif ps == PauseSystem.PauseType.CUTSCENE_PAUSED:
|
||||
if pause.entities.find(self) != -1:
|
||||
return true;
|
||||
return false;
|
||||
return false;
|
||||
return true;
|
||||
return false;
|
||||
|
||||
# Private methods
|
||||
|
@@ -2,7 +2,7 @@ class_name TestNPCController extends "res://scripts/Entities/OverworldEntity.gd"
|
||||
const TestCutscene = preload("res://scripts/Cutscene/TestCutscene.gd")
|
||||
|
||||
func interact(interactor) -> void:
|
||||
getSystems().CUTSCENE.setCurrentCutscene(TestCutscene.new());
|
||||
getSystems().CUTSCENE.setCurrentCutscene(TestCutscene.new(interactor, self));
|
||||
|
||||
func updateMovement(delta) -> void:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user