// Start is called before the first frame update void Start() { //Guardamos referencia al script para poder hacer spawn cuando se necesite manageObjetives = GetComponent <ManageObjetives>(); startEvent = GetComponent <ClickToStart>(); //Calculamos la racha máxima maxKills = testDuration * maxKPS; //Calculamos la puntuación máxima }
void OnExplode() { Destroy(gameObject); GameObject go = new GameObject("ClickToStart"); ClickToStart script = go.AddComponent <ClickToStart> (); SceneManager.LoadScene("Preparation"); go.AddComponent <RestartText> (); }
// Start is called before the first frame update void Start() { //Guardamos referencia al script para poder hacer spawn cuando se necesite manageObjetives = GetComponent <ManageObjetives>(); startEvent = GetComponent <ClickToStart>(); //Se crea el primer objetivo y se desactiva para usarlo luego actualObjetive = manageObjetives.Spawn(); actualObjetive.SetActive(false); }
// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { clickToStart = GameObject.FindObjectOfType <ClickToStart>(); clickToStart.gameObject.SetActive(false); }