Beispiel #1
0
    IEnumerator StartSceneSlider()
    {
        float distance = rect.offsetMax.y / 2;

        while (true)
        {
            Vector2 offsetMax = rect.offsetMax;
            offsetMax.y   += Time.deltaTime * 1500;
            rect.offsetMax = offsetMax;
            Vector2 offsetMin = rect.offsetMin;
            offsetMin.y   += Time.deltaTime * 1500;
            rect.offsetMin = offsetMin;

            if (distance < 0)
            {
                if (offsetMax.y > distance)
                {
                    distance = 1;
                    DarkestSoundManager.PlayTitleMusic(false);
                }
            }

            if (rect.offsetMax.y >= 0 || rect.offsetMin.y >= 0)
            {
                rect.offsetMax = Vector2.zero;
                rect.offsetMin = Vector2.zero;
                break;
            }
            yield return(0);
        }

        CampaignSelectionManager.Instanse.titleRect.SetParent(CampaignSelectionManager.Instanse.overlayTitleRect, false);
        yield break;
    }
Beispiel #2
0
 void Start()
 {
     DarkestSoundManager.PlayTitleMusic(true);
 }