コード例 #1
0
ファイル: ThrowingEnemy.cs プロジェクト: maggardJosh/LD44
    private void JitterLogic()
    {
        controller.FacePosition(player.transform.position);
        Vector3 newTarget = startPos + new Vector3(Random.Range(-jitterRandom, jitterRandom), Random.Range(-jitterRandom, jitterRandom), 0);

        transform.position = Vector3.MoveTowards(transform.position, newTarget, 1f * Time.deltaTime);
    }
コード例 #2
0
ファイル: M4.cs プロジェクト: maggardJosh/LD44
    private IEnumerator CutsceneLogic()
    {
        while (FadeTransitionScreen.Instance.IsTransitioning)
        {
            yield return(null);
        }
        FadeTransitionScreen.Instance.SetCinematic(true);
        yield return(new WaitForSeconds(3f));

        GameObject fargoth = GameObject.Find("Fargoth");

        TopDownController p = FindObjectOfType <PlayerController>().GetComponent <TopDownController>();

        yield return(MoveToPosition(p, GameObject.Find("CinemaStartPos").transform.position, 1.5f));

        p.FacePosition(fargoth.transform.position);
        yield return(new WaitForSeconds(1f));

        yield return(MoveToPosition(fargoth.GetComponent <TopDownController>(), p.transform.position + Vector3.left * 4f, 1f));

        yield return(new WaitForSeconds(.5f));

        yield return(MoveToPosition(fargoth.GetComponent <TopDownController>(), p.transform.position + Vector3.left * 2f, 3f));

        yield return(new WaitForSeconds(1f));

        yield return(DialogueManager.Instance.StartDialogueThreaded(cutsceneDialogue));

        yield return(MoveToPosition(fargoth.GetComponent <TopDownController>(), p.transform.position + Vector3.left * 2f + Vector3.up * 20f, 1f));

        if (partSyst != null)
        {
            partSyst.Stop();
        }
        yield return(new WaitForSeconds(3f));

        SoundManager.Instance.PlaySound(SoundManager.Sound.Music_Transition2);
        FadeTransitionScreen.Instance.Transition(() =>
        {
            SceneManager.LoadScene(p.GetComponent <PlayerController>().sceneToWarpBackTo);
        });
    }
コード例 #3
0
 public override void Interact(GameObject player)
 {
     controller.FacePosition(player.transform.position);
     ChangeState(State.Interacting);
 }