Beispiel #1
0
    void ShowDuckpic(DungeonCanvas canvas)
    {
        CharacterModel model = GameObject.Find("CharacterImageCapture").GetComponentInChildren <CharacterModel>();

        model.transform.localPosition = Vector3.zero;
        model.ChangeModel(Game.instance.followerData);
        canvas.duckpicUI.gameObject.SetActive(true);
    }
Beispiel #2
0
    private IEnumerator DeathTransition(string extraData)
    {
        isTransitioning = true;

        deathMessage.GetComponentInChildren <TextMeshProUGUI>().CrossFadeAlpha(1f, 0f, false);

        yield return(StartCoroutine(Fade(new Color(0, 0, 0, 0), new Color(0, 0, 0, 1))));

        mCharacterImageCapture = GameObject.Find("CharacterImageCapture");
        CharacterModel model = mCharacterImageCapture.GetComponentInChildren <CharacterModel>();

        model.transform.localPosition = Vector3.zero;
        model.ChangeModel(Game.instance.followerData);

        deathSpeakerImage.gameObject.SetActive(true);
        StartCoroutine(FadeDeathSpeaker(new Color(0, 0, 0, 0), new Color(1, 1, 1, 1)));

        string msg = null;

        if (extraData == "success")
        {
            msg = LocalizedText.Get(LocalizedText.GetKeysInList("[DUNGEON_SUCCESS]").Sample());
        }
        else
        {
            msg = LocalizedText.Get(LocalizedText.GetKeysInList("[BREAKUP]").Sample());
        }

        if (!Game.instance.finishedTutorial)
        {
            msg = LocalizedText.Get("[BREAKUP_1]");
        }
        yield return(deathMessage.ShowTextCoroutine(msg, 1f, false));

        yield return(new WaitForSeconds(1f));

        deathMessage.GetComponentInChildren <TextMeshProUGUI>().CrossFadeAlpha(0f, 0.5f, false);
        yield return(StartCoroutine(FadeDeathSpeaker(new Color(1, 1, 1, 1), new Color(0, 0, 0, 0))));

        deathSpeakerImage.gameObject.SetActive(false);

        yield return(StartCoroutine(ShowUnlocks()));

        yield return(StartCoroutine(ChangeScene("HUB")));

        yield return(new WaitForSeconds(0.1f));

        yield return(StartCoroutine(Fade(new Color(0, 0, 0, 1), new Color(0, 0, 0, 0))));

        fullScreenQuad.gameObject.SetActive(false);

        deathMessage.gameObject.SetActive(false);

        isTransitioning = false;

        yield break;
    }
Beispiel #3
0
    public void AcceptCharacter(CharacterData characterData)
    {
        Game.instance.playerData.followerUid = characterData.characterUniqueId;

        matchView.SetActive(true);
        standardView.SetActive(false);

        Material material = Game.instance.companionBuilder.MaterialByName(Game.instance.playerData.material);

        rigModel1.ChangeModel(Game.instance.playerData.model, material, false);
        rigModel2.ChangeModel(characterData, false);

        Game.instance.soundManager.PlaySound("confirm_special");

        UpdateTabVisuals();
    }
Beispiel #4
0
    public override IEnumerator PlayInternal(CinematicDirector player)
    {
        GameObject speakerContainer = player.objectMap.GetObjectByName("speaker");
        bool       showSpeaker      = (mSpeakerModel != "none");

        if (speakerContainer != null)
        {
            player.objectMap.GetObjectByName("speaker").SetActive(showSpeaker);
        }

        if (showSpeaker)
        {
            CharacterModel model = GameObject.Find("CharacterImageCapture").GetComponentInChildren <CharacterModel>();
            model.transform.localPosition = new Vector3(0f, 0f, 0.5f);

            Material material = (mUseSpeakerMaterial ? Game.instance.followerData.material : null);
            model.ChangeModel(mSpeakerModel, material, false);
        }

        yield break;
    }