Exemple #1
0
 // 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
 }
Exemple #2
0
    void OnExplode()
    {
        Destroy(gameObject);

        GameObject   go     = new GameObject("ClickToStart");
        ClickToStart script = go.AddComponent <ClickToStart> ();

        SceneManager.LoadScene("Preparation");
        go.AddComponent <RestartText> ();
    }
Exemple #3
0
    // 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);
    }
Exemple #4
0
 // 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);
 }