コード例 #1
0
 public void GetDirection()
 {
     Script_Utils.GetDirectionToTarget(
         Ellenia.transform.position,
         Script_Game.Game.GetPlayer().transform.position
         );
 }
コード例 #2
0
    public void ElleniaFacesPlayer()
    {
        Directions directionOfPlayer = Script_Utils.GetDirectionToTarget(
            Ellenia.transform.position, Script_Game.Game.GetPlayer().transform.position
            );

        Ellenia.FaceDirection(directionOfPlayer);
    }
コード例 #3
0
    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);
    }
コード例 #5
0
    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);
    }
コード例 #6
0
    /// 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);
        }
    }