Пример #1
0
 public void BossAliveChecker()
 {
     if (cmp_enemyBoss.bosslife <= 0)
     {
         cmp_scnChng.Change(lvl3Victory);
     }
 }
Пример #2
0
 public void Ison_tomainscene()
 {
     SoundManager.instance.PlaySound();
     Time.timeScale = 1;
     PlayerPrefs.SetInt(Prefstype.IsToMain, 1);
     SceneChange.Change(SceneType.Loading);
 }
Пример #3
0
 private void Update()
 {
     PlayerPrefs.SetFloat(Prefstype.BgmVol, Bgm.value);
     PlayerPrefs.SetFloat(Prefstype.SoundVol, Sound.value);
     ChapterButton.transform.localPosition = Vector3.MoveTowards(ChapterButton.transform.localPosition, new Vector3(-20 * (pages - 1), 0, 0), speed * Time.deltaTime);
     if (fadeIntrue)
     {
         if (fades < 1.0f)
         {
             fade.raycastTarget = true;
             fades     += 0.01f;
             fade.color = new Color(0, 0, 0, fades);
         }
         else if (fades >= 1.0f)
         {
             SceneChange.Change(SceneType.Loading);
             fadeIntrue = false;
         }
     }
     else if (fadeOuttrue) // fadeout
     {
         if (fades >= 0)
         {
             titlemanager.enabled = false;
             fade.raycastTarget   = true;
             fades     -= 0.01f;
             fade.color = new Color(0, 0, 0, fades);
         }
         else if (fades <= 0)
         {
             fade.raycastTarget = false;
             fadeOuttrue        = false;
         }
     }
 }
Пример #4
0
 // Update is called once per frame
 void FixedUpdate()
 {
     if (Input.anyKey)
     {
         sc.Change("MainMenu");
     }
 }
Пример #5
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Space))
     {
         sceneChange.Change();
     }
 }
Пример #6
0
 public void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("Player"))
     {
         cmp_ChangeSc.Change(sceneName);
     }
 }
Пример #7
0
    private void TransitionGame()
    {
        //GameObject GameSystem = GameObject.Find("ManegerScene");

        //system = GameSystem.GetComponent<GameSystem>();
        //system = GameSystem.GameOverMove();
        var gameManager = GameObject.FindWithTag("ManagerScene").GetComponent <SceneChange>();

        //Debug.Log(gameManager.name);
        SceneChange.Change();
        transition = false;
    }
Пример #8
0
 void StartChallenge()
 {
     if (numPivotChallenge == 1)
     {
         dsfOne.GetComponent <Desafio1>().EmpezarDesafio();
     }
     else if (numPivotChallenge == 2)
     {
         dsfTwo.GetComponent <Desafio2>().EmpezarDesafio();
     }
     else if (numPivotChallenge == 3)
     {
         dsfThree.GetComponent <Desafio3>().EmpezarDesafio();
     }
     else if (numPivotChallenge >= 4)
     {
         cmp_scnChng.Change(nxtLvlNameScn);
     }
 }
Пример #9
0
 void StartPart()
 {
     if (numPivotChallenge == 1)
     {
         part1.GetComponent <Tuto1>().Instructions1();
     }
     else if (numPivotChallenge == 2)
     {
         part1.GetComponent <Tuto1>().Instructions2();
     }
     else if (numPivotChallenge == 3)
     {
         part1.GetComponent <Tuto1>().Instructions3();
     }
     else if (numPivotChallenge >= 4)
     {
         cmp_scnCh.Change("Nivel 1");
     }
 }
Пример #10
0
    void SceneFadeOut()
    {
        sceneChange.sceneName = changeName;
        fadeImage.GetComponent <Image>().color = new Color(1, 1, 1, alfa);
        if (fadeImage.enabled == false)
        {
            fadeImage.enabled = true;
        }

        alfa += fadeSpeed;
        if (alfa >= 1)
        {
            isFadeOut = false;
            if (sceneChangeSwitch == true)
            {
                sceneChange.Change();
            }
        }
    }
Пример #11
0
 void StartChallenge()
 {
     if (numPivotChallenge == 1)
     {
         dsfOne.GetComponent <Desafio1>().EmpezarDesafio();
         timer += Time.deltaTime;
     }
     else if (numPivotChallenge == 2)
     {
         dsfTwo.GetComponent <Desafio2>().EmpezarDesafio();
     }
     else if (numPivotChallenge == 3)
     {
         dsfThree.GetComponent <Desafio3>().EmpezarDesafio();
     }
     else if (numPivotChallenge >= 4)
     {
         cmp_scnChng.Change("Nivel 3");
     }
 }
Пример #12
0
 public void CheckClickContinue()
 {
     Debug.Log(SceneSystem.LoadBallNum);
     SceneSystem.Continued = true;
     SceneChange.Change();
 }
Пример #13
0
 public void CheckClick()
 {
     SceneChange.Change();
     SceneSystem.start = true;
 }