Exemplo n.º 1
0
 public void OnClick()
 {
     if (isEnabled)
     {
         btnControl.ButtonClicked(m_type);
     }
     else
     {
         audioManager.Play("click_error");
     }
 }
 public void OnClick()
 {
     buttonControl.ButtonClicked(featureID);
 }
Exemplo n.º 3
0
 public void OnClick()
 {
     Debug.Log(myLevelToLoad);
     buttonControl.ButtonClicked(myLevelToLoad);
 }
 /* Displays the clicked username on the display board */
 public void OnClick()
 {
     buttonToDisplayName.ButtonClicked(textToDisplay);
 }
 public void OnClick()
 {
     buttonControl.ButtonClicked(MyText.text);
 }
 public void OnClick()
 {
     buttonControl.ButtonClicked(myTextString);
 }
Exemplo n.º 7
0
 public void OnClick()
 {
     buttonControl.ButtonClicked(questionId);
 }
 // pass the level name to be loaded
 public void OnClick()
 {
     buttonControl.ButtonClicked(fileName.text);
 }
Exemplo n.º 9
0
    public void OnClick()
    {
        // Quand le bouton est cliqué : (executer les fonctions)

        buttonControl.ButtonClicked(myTextString, idButton);
    }
    public void TaskOnClick()
    {
        foreach (GameObject g in p.current3dstars)
        {
            if (g != null)
            {
                Destroy(g);
            }
        }

        foreach (GameObject g in p.current3dplanets)
        {
            if (g != null)
            {
                Destroy(g);
            }
        }

        buttonControl.ButtonClicked(myTextString);

        GameObject SolarCenter = new GameObject();
        GameObject SunStuff    = new GameObject();
        GameObject AllOrbits   = new GameObject();
        GameObject Planets     = new GameObject();

        SolarCenter.transform.parent = allThings.transform;
        AllOrbits.transform.parent   = SolarCenter.transform;
        SunStuff.transform.parent    = SolarCenter.transform;
        Planets.transform.parent     = SolarCenter.transform;

        //SolarCenter.transform.localPosition = Vector3.zero;
        //AllOrbits.transform.localPosition = Vector3.zero;
        //SunStuff.transform.localPosition = Vector3.zero;
        //Planets.transform.localPosition = Vector3.zero;

        p.dealWithStar(starInfo, SunStuff, AllOrbits);
        p.dealWithPlanets(planetInfo, Planets, AllOrbits);

        p.numberOf3Dsystems += 1;

        Debug.Log(p.numberOf3Dsystems);

        // PROMISING!

        /*if (p.numberOf3Dplanets == 0)
         *      allThings.transform.position = Vector3.zero;
         * else if (p.numberOf3Dplanets == 1) {
         *      allThings.transform.position = new Vector3 (0, -70, 0);
         * } else if (p.numberOf3Dplanets == 2) {
         *      allThings.transform.position = new Vector3 (0, -140, 0);
         * } else if (p.numberOf3Dplanets == 3) {
         *      allThings.transform.position = new Vector3 (0, -210, 0);
         * } else if (p.numberOf3Dplanets == 4) {
         *      allThings.transform.position = new Vector3 (0, -280, 0);
         * } else {
         *      allThings.transform.position = Vector3.zero;
         * }*/

        /*Vector3 tempTranslate = new Vector3 (0, -10, 0);*/
        // allThings.transform.position = new Vector3(0, -50, 0);

        // SolarCenter.transform.localPosition = Vector3.zero;
        // AllOrbits.transform.localPosition = Vector3.zero;
        // SunStuff.transform.localPosition = Vector3.zero;
        // Planets.transform.localPosition = Vector3.zero;

        Debug.Log("Solar center: " + SolarCenter.transform.position);
        Debug.Log("Sun Stuff: " + SunStuff.transform.position);
        Debug.Log("AllOrbits: " + AllOrbits.transform.position);
        Debug.Log("Planets: " + Planets.transform.position);

//		Debug.Log ("SunStuff position: " + SunStuff.transform.position);
//		Debug.Log ("Planets position: " + Planets.transform.position);

        // Debug.Log ("AllOrbits: " + AllOrbits.transform.localPosition);



        // p.generate3dSystem (p.starData, systemId, p.planetData, offset, allThings);
        // SolarCenter.transform.position = offset;
        // p.numberOf3Dplanets += 1;
    }
Exemplo n.º 11
0
 // function to provide logic on a click
 public void OnClick()
 {
     lobbyNum.ButtonClicked(LobbyIDCopy);
 }
Exemplo n.º 12
0
    public void TaskOnClick()
    {
        foreach (GameObject g in p.current3dstars)
        {
            Destroy(g);
        }

        /*foreach (List<GameObject> l in p.current3dplanets)
         *      foreach (GameObject g in l)
         *              Destroy (g);*/
        foreach (GameObject g in p.current3dplanets)
        {
            Destroy(g);
        }

        // Debug.Log (p.numberOf3Dplanets);
        buttonControl.ButtonClicked(myTextString);
        GameObject SolarCenter = new GameObject();
        GameObject SunStuff    = new GameObject();
        GameObject AllOrbits   = new GameObject();
        GameObject Planets     = new GameObject();

        SolarCenter.transform.parent = allThings.transform;
        AllOrbits.transform.parent   = SolarCenter.transform;
        SunStuff.transform.parent    = SolarCenter.transform;
        Planets.transform.parent     = SolarCenter.transform;

        p.dealWithStar(starInfo, SunStuff, AllOrbits);
        p.dealWithPlanets(planetInfo, Planets, AllOrbits);
        p.numberOf3Dsystems += 1;
        // Debug.Log (p.current3dstars[0]);

        // p.generate3dSystem (p.starData[systemId], systemId, p.planetData[systemId], offset, allThings);


        //p = new GameObject ().GetComponent<Planets> ();

        // p.generate3dSystem (starInfo, systemId, planetInfo, offset, allThings);


        // PROMISING!

        /*if (p.numberOf3Dplanets == 0)
         *      allThings.transform.position = Vector3.zero;
         * else if (p.numberOf3Dplanets == 1) {
         *      allThings.transform.position = new Vector3 (0, -70, 0);
         * } else if (p.numberOf3Dplanets == 2) {
         *      allThings.transform.position = new Vector3 (0, -140, 0);
         * } else if (p.numberOf3Dplanets == 3) {
         *      allThings.transform.position = new Vector3 (0, -210, 0);
         * } else if (p.numberOf3Dplanets == 4) {
         *      allThings.transform.position = new Vector3 (0, -280, 0);
         * } else {
         *      allThings.transform.position = Vector3.zero;
         * }*/

        /*if (p.numberOf3Dplanets == 0) {
         *      allThings.transform.position = Vector3.zero;
         *      p.numberOf3Dplanets = 1;
         * } else {
         *      allThings.transform.position = Vector3.zero;
         *      Destroy (p.current3dstars[0]);
         *      foreach (GameObject g in p.current3dplanets)
         *              Destroy (g);
         *      p.current3dstars.Clear ();
         *      p.current3dplanets.Clear ();
         * }*/



        // SolarCenter.transform.localPosition = Vector3.zero;
        // AllOrbits.transform.localPosition = Vector3.zero;
        // SunStuff.transform.localPosition = Vector3.zero;
        // Planets.transform.localPosition = Vector3.zero;

        /*Debug.Log ("Solar center: " + SolarCenter.transform.localPosition);
         * Debug.Log ("Sun Stuff: " + SunStuff.transform.localPosition);
         * Debug.Log ("AllOrbits: " + AllOrbits.transform.localPosition);
         * Debug.Log ("Planets: " + Planets.transform.localPosition);*/

//		Debug.Log ("SunStuff position: " + SunStuff.transform.position);
//		Debug.Log ("Planets position: " + Planets.transform.position);

        // Debug.Log ("AllOrbits: " + AllOrbits.transform.localPosition);



        // p.generate3dSystem (p.starData, systemId, p.planetData, offset, allThings);
        // SolarCenter.transform.position = offset;
        // p.numberOf3Dplanets += 1;
    }