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
|
||||
|
Reference in New Issue
Block a user