コード例 #1
0
ファイル: MainMenu.cs プロジェクト: LaserCannon/OneTouchCards
    IEnumerator MoveToSong()
    {
        yield return(ColorCard.FadeToBlack(0.5f));

        Vector3 pos = Camera.main.transform.position;

        pos.x = 10;
        Camera.main.transform.position = pos;

        yield return(ColorCard.FadeToPicture(0.5f));

        isSelectingSong = true;
    }
コード例 #2
0
    IEnumerator Start()
    {
        ColorCard.FadeToBlack(0f);
        yield return(null);

        ColorCard.FadeToPicture(1f);
        yield return(new WaitForSeconds(2f));

        State = GameState.Start;

        StartCoroutine(DoIntroAndBegin());

        P1.onCardSelected += OnCardSelected;
        P2.onCardSelected += OnCardSelected;

        BattleMgr.onBattleOver += OnBattleEnded;
    }
コード例 #3
0
ファイル: MainMenu.cs プロジェクト: LaserCannon/OneTouchCards
    IEnumerator BeginFlashing()
    {
        float t = 0f;

        while (!Input.GetMouseButtonDown(0))
        {
            if (Mathf.FloorToInt(t) % 2 == 0)
            {
                PressStart.enabled = true;
            }
            else
            {
                PressStart.enabled = false;
            }

            t += Time.deltaTime * 4f;

            yield return(null);
        }

        yield return(ColorCard.FadeToBlack(0.5f));

        Vector3 pos = Camera.main.transform.position;

        pos.x = 0f;
        Camera.main.transform.position = pos;
        yield return(null);

        yield return(ColorCard.FadeToPicture(0.5f));

        SelectionMenu1.CreatePool();

        yield return(new WaitForSeconds(0.25f));

        SelectionMenu2.CreatePool();

        poolCreated = true;
    }