/
CodigoMenuIniciar.cs
62 lines (53 loc) · 1.38 KB
/
CodigoMenuIniciar.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class CodigoMenuIniciar : MonoBehaviour
{
private Animator barraAnim;
private bool sobe;
private string[] secretCode;
private int index;
void Start(){
secretCode = new string[] { "z", "o", "n", "e", "t", "a", "n" }; //type these letters inside the keys in the game menu to access a secret scene :)
index = 0;
}
void Update(){
if(Input.anyKeyDown){
if(Input.GetKeyDown(secretCode[index])){
index++;
}
else
{
index = 0;
}
}
if(index == secretCode.Length){
NGHelper.instance.unlockMedal(77611);
SceneManager.LoadScene(22);
}
}
public void Jogar()
{
NGHelper.instance.unlockMedal(70841);
SceneManager.LoadScene(2);
}
public void AnimaMenu()
{
barraAnim = GameObject.FindGameObjectWithTag("barraAnimTag").GetComponent<Animator>();
if (sobe == false)
{
barraAnim.Play("Move_UI");
sobe = true;
}
else
{
barraAnim.Play("Move_UI_Inverso");
sobe = false;
}
}
public void SairDoJogo()
{
Application.Quit();
}
}