コード例 #1
0
ファイル: Chapter1Events.cs プロジェクト: Y0uka1/9thDimention
    private void WardrobeClose()
    {
        wardrobe.SetActive(false);
        TapSpace.Next();

        Destroy(wardrobe);
        TapSpace.image.raycastTarget = true;
    }
コード例 #2
0
ファイル: Chapter1Events.cs プロジェクト: Y0uka1/9thDimention
    IEnumerator PlayCaw()
    {
        AudioClip   clip      = Resources.Load <AudioClip>("Audio/caw");
        AudioSource soundBuff = GameObject.Find("SoundBuff").GetComponent <AudioSource>();

        soundBuff.clip = clip;
        soundBuff.Play();

        yield return(new WaitForSeconds(clip.length + 1f));

        TapSpace.Next();
    }
コード例 #3
0
    public IEnumerator Reputation(ReputationType type, string text)
    {
        GameObject temp;

        switch (type)
        {
        case ReputationType.Good:
        {
            temp = Instantiate(Resources.Load <GameObject>("Prefabs/GoodBoy"));
            break;
        }

        case ReputationType.Bad:
        {
            temp = Instantiate(Resources.Load <GameObject>("Prefabs/BadBoy"));
            break;
        }

        case ReputationType.Personal:
        {
            temp = Instantiate(Resources.Load <GameObject>("Prefabs/Relations"));
            break;
        }

        default:
        {
            temp = Instantiate(Resources.Load <GameObject>("Prefabs/Relations"));
            break;
        }
        }
        temp.GetComponentInChildren <Text>().text = text;
        temp.transform.SetParent(GameObject.Find("Canvas").transform);
        RectTransform rect = temp.GetComponent <RectTransform>();

        rect.anchoredPosition = Vector2.zero;
        rect.offsetMin        = new Vector2(0, rect.offsetMin.y);
        rect.offsetMax        = new Vector2(0, rect.offsetMax.y);
        rect.localScale       = Vector2.one;
        StartCoroutine(Tools.MakeTransparent(temp.GetComponentInChildren <Image>(), 0.5f, false));
        yield return(StartCoroutine(Tools.MakeTransparentText(temp.GetComponentInChildren <Text>(), 0.5f, false)));

        yield return(StartCoroutine(MakeTransparentObject(panel, 0.5f, true)));

        TapSpace.Next();
        yield return(new WaitForSeconds(1.5f));

        StartCoroutine(Tools.MakeTransparent(temp.GetComponentInChildren <Image>(), 0.5f, true));
        yield return(StartCoroutine(Tools.MakeTransparentText(temp.GetComponentInChildren <Text>(), 0.5f, true)));

        MainManager.textManager.isTyping = false;
        Destroy(panel);
    }
コード例 #4
0
ファイル: Chapter1Events.cs プロジェクト: Y0uka1/9thDimention
    IEnumerator LoadDreamC()
    {
        BackgroundManager.curBackground = BackgroundManager.backgroundsList[2];
        MainManager.bgManager.ChangeBackground();
        MainManager.bgManager.targetTexture.GetComponent <RectTransform>().offsetMin = new Vector2(-1900, 0);
        MainManager.bgManager.targetTexture.GetComponent <RectTransform>().offsetMax = new Vector2(350, 0);

        while (!MainManager.bgManager.bgVideoPlayer.isPlaying)
        {
            yield return(new WaitForFixedUpdate());
        }
        TapSpace.Next();
    }
コード例 #5
0
ファイル: Chapter1Events.cs プロジェクト: Y0uka1/9thDimention
    IEnumerator FlyCamera()
    {
        RectTransform rect;

        rect = MainManager.bgManager.targetTexture.GetComponent <RectTransform>();

        yield return(new WaitForSeconds(0.5f));

        while (rect.offsetMin.x < -300 && rect.offsetMax.x < 1950)
        {
            rect.offsetMax = new Vector2(rect.offsetMax.x + (800 * Time.deltaTime), rect.offsetMax.y);
            rect.offsetMin = new Vector2(rect.offsetMin.x + (800 * Time.deltaTime), rect.offsetMin.y);
            yield return(null);
        }

        Chapter1Events.cmaeraFlyDone = true;
        TapSpace.Next();
        MainManager.textManager.isTyping = false;
    }