コード例 #1
0
ファイル: Controls.cs プロジェクト: jinwoo1601/PathToHarmony
    // Update is called once per frame
    void Update()
    {
        if (Input.anyKey)
        {
            fade.fadeToScene("Prologue");
        }

        if (increasing)
        {
            currentAlpha += (Time.deltaTime * blinkSpeed);
        }
        else
        {
            currentAlpha -= (Time.deltaTime * blinkSpeed);
        }

        if (currentAlpha > 1)
        {
            increasing = false;
        }

        if (currentAlpha < 0)
        {
            increasing = true;
        }

        Color temp = anyKeyToContinue.color;

        temp.a = currentAlpha;
        anyKeyToContinue.color = temp;
    }
コード例 #2
0
        private async void advanceCampaign()
        {
            victoryImage.enabled = true;
            await Task.Delay(TimeSpan.FromMilliseconds(6000));

            victoryImage.enabled = false;

            Persistence.campaign.levelIndex++;

            await runAppropriateCutscenes(true);

            //check for end of campaign
            if (Persistence.campaign.levelIndex >= Persistence.campaign.levels.Count())
            {
                fade.fadeToScene("VictoryScene");
            }
            else
            {
                Persistence.saveProgress();
                //Oh Boy im glad this works.
                fade.fadeToScene("DemoBattle");
            }
        }
コード例 #3
0
ファイル: Prologue.cs プロジェクト: jinwoo1601/PathToHarmony
    // Update is called once per frame
    void Update()
    {
        if (Input.GetButtonDown("Select"))
        {
            scrollSpeed = initialScrollSpeed * 5f;
        }

        if (Input.GetButtonUp("Select"))
        {
            scrollSpeed = initialScrollSpeed;
        }

        if (!Input.GetButtonDown("Select") && (Input.anyKeyDown))
        {
            fade.fadeToScene("DemoBattle");
        }

        prologueText.transform.position += new Vector3(0, scrollSpeed * Time.deltaTime, 0);

        if (prologueText.transform.position.y > 2400)
        {
            fade.fadeToScene("DemoBattle");
        }
    }
コード例 #4
0
 public void playGame()
 {
     Persistence.saveProgress();
     fade.fadeToScene("DemoBattle");
 }
コード例 #5
0
 public void mainMenu()
 {
     Persistence.saveProgress();
     fade.fadeToScene("Title");
 }
コード例 #6
0
 public void playGame()
 {
     Persistence.saveProgress();
     fade.fadeToScene("Controls");
 }
コード例 #7
0
 // Use this for initialization
 public void goToMainMenu()
 {
     fade.fadeToScene("Title");
 }