Example #1
0
    // 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;
    }
Example #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");
            }
        }
Example #3
0
    // 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");
        }
    }
Example #4
0
 public void playGame()
 {
     Persistence.saveProgress();
     fade.fadeToScene("DemoBattle");
 }
Example #5
0
 public void mainMenu()
 {
     Persistence.saveProgress();
     fade.fadeToScene("Title");
 }
Example #6
0
 public void playGame()
 {
     Persistence.saveProgress();
     fade.fadeToScene("Controls");
 }
Example #7
0
 // Use this for initialization
 public void goToMainMenu()
 {
     fade.fadeToScene("Title");
 }