mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Set dialogue for FacePlayerWhenTalkings
This commit is contained in:
parent
13b779aa63
commit
d843cd17aa
@ -216,6 +216,20 @@ namespace NewHorizons.Builder.Props
|
||||
// TODO: make a custom controller for basic characters to just turn them to face you
|
||||
}
|
||||
|
||||
var facePlayerWhenTalking = character.GetComponent<FacePlayerWhenTalking>();
|
||||
if (facePlayerWhenTalking != null)
|
||||
{
|
||||
if (facePlayerWhenTalking._dialogueTree != null)
|
||||
{
|
||||
facePlayerWhenTalking._dialogueTree.OnStartConversation -= facePlayerWhenTalking.OnStartConversation;
|
||||
facePlayerWhenTalking._dialogueTree.OnEndConversation -= facePlayerWhenTalking.OnEndConversation;
|
||||
}
|
||||
|
||||
facePlayerWhenTalking._dialogueTree = dialogue;
|
||||
facePlayerWhenTalking._dialogueTree.OnStartConversation += facePlayerWhenTalking.OnStartConversation;
|
||||
facePlayerWhenTalking._dialogueTree.OnEndConversation += facePlayerWhenTalking.OnEndConversation;
|
||||
}
|
||||
|
||||
if (info.lookAtRadius > 0)
|
||||
{
|
||||
var playerTrackingZone = new GameObject("PlayerTrackingZone");
|
||||
|
||||
2
NewHorizons/External/Modules/PropModule.cs
vendored
2
NewHorizons/External/Modules/PropModule.cs
vendored
@ -421,7 +421,7 @@ namespace NewHorizons.External.Modules
|
||||
|
||||
/// <summary>
|
||||
/// If this dialogue is meant for a character, this is the relative path from the planet to that character's
|
||||
/// CharacterAnimController, TravelerController, TravelerEyeController (eye of the universe), or SolanumAnimController.
|
||||
/// CharacterAnimController, TravelerController, TravelerEyeController (eye of the universe), FacePlayerWhenTalking, or SolanumAnimController.
|
||||
/// </summary>
|
||||
public string pathToAnimController;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user