public void GetDirection() { Script_Utils.GetDirectionToTarget( Ellenia.transform.position, Script_Game.Game.GetPlayer().transform.position ); }
public void ElleniaFacesPlayer() { Directions directionOfPlayer = Script_Utils.GetDirectionToTarget( Ellenia.transform.position, Script_Game.Game.GetPlayer().transform.position ); Ellenia.FaceDirection(directionOfPlayer); }
private void Awake() { Script_Player player = Script_Game.Game.GetPlayer(); Directions dir = Script_Utils.GetDirectionToTarget( player.transform.position, target.position ); player.FaceDirection(dir); }
public void FacePlayer() { Script_Player player = Script_Game.Game.GetPlayer(); Directions dir = Script_Utils.GetDirectionToTarget( transform.position, player.transform.position ); GetComponent <Script_MovingNPC>().FaceDirection(dir); }
private void Awake() { foreach (Script_MovingNPC npc in movingNPCs) { Directions faceDirection = Script_Utils.GetDirectionToTarget( npc.transform.position, Script_Game.Game.GetPlayer().transform.position ); Debug.Log($"npc {npc.name} face {faceDirection}"); npc.FaceDirection(faceDirection); } this.gameObject.SetActive(false); }
/// NextNodeAction START ===================================================================== /// Node: "i'm part of the..." public void PlayOminousMusic() { game.ChangeStateCutScene(); Ellenia.FaceDirection(Directions.Left); // fade out music and pause StartCoroutine( Script_AudioMixerFader.Fade( audioMixer, Const_AudioMixerParams.ExposedMasterVolume, bgMusicFadeOutTime, 0f, () => { // after faded out, pause bg music and start theme music where Ellenia // should turn on beat game.PauseBgMusic(); Script_AudioMixerVolume .SetVolume(audioMixer, Const_AudioMixerParams.ExposedMasterVolume, 1f); ElleniaBgThemePlayer.gameObject.SetActive(true); StartCoroutine(StartDialogueOnBeat()); } ) ); IEnumerator StartDialogueOnBeat() { yield return(new WaitForSeconds(waitToTurnTime)); Directions directionToPlayer = Script_Utils.GetDirectionToTarget( Ellenia.transform.position, Script_Game.Game.GetPlayer().transform.position ); Ellenia.FaceDirection(directionToPlayer); // then play dialogueNode Script_DialogueManager.DialogueManager.StartDialogueNode(introContinuationNode, false); } }