Ejemplo n.º 1
0
    private IEnumerator Play()
    {
        bool first = true;

        foreach (Credits.CreditLog item in this.logQueue)
        {
            Credits.CreditLogType type = this.logTypes[item.type];
            if (first)
            {
                first = false;
            }
            else
            {
                int i = 0;
                while ((float)i < type.preTime / this.speed)
                {
                    yield return(new WaitForSeconds(0.02f / this.speed));

                    i++;
                }
            }
            this.SpawnType(type, item.text1_en, item.text2_en);
            int j = 0;
            while ((float)j < type.postTime)
            {
                yield return(new WaitForSeconds(0.02f / this.speed));

                j++;
            }
        }
        yield return(new WaitForSeconds(8f / this.speed));

        base.GetComponentInParent <MainMenuScript>().ChangeMenu(0);
        yield break;
    }
Ejemplo n.º 2
0
    private void SpawnType(Credits.CreditLogType l, string txt1, string txt2)
    {
        GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(l.preset, this.maskPosition);

        Text[] componentsInChildren = gameObject.GetComponentsInChildren <Text>();
        componentsInChildren[0].text = txt1;
        if (componentsInChildren.Length > 1)
        {
            componentsInChildren[1].text = txt2;
        }
        UnityEngine.Object.Destroy(gameObject, 12f / this.speed);
        this.spawnedLogs.Add(gameObject);
        CreditText component = gameObject.GetComponent <CreditText>();

        component.move   = true;
        component.speed *= this.speed;
    }