Exemplo n.º 1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.gameObject == ball)
     {
         gui g = Camera.main.gameObject.GetComponent <gui>();
         PlayerPrefs.SetInt("last_score", g.score);
         Application.LoadLevel("testing");
     }
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     S            = this;
     player1Goals = 0;
     player2Goals = 0;
     rightScore   = GameObject.Find("ScoreRight").GetComponent <Text> ();
     leftScore    = GameObject.Find("ScoreLeft").GetComponent <Text>();
     goalText     = GameObject.Find("GoalText");
     goalText.SetActive(false);
 }
Exemplo n.º 3
0
    void Start()
    {
        rigidbody        = GetComponent <Rigidbody>();
        input            = new Vector3();
        jumpCount        = 0;
        startPoint       = GameObject.FindGameObjectWithTag("Start Point").transform.position;
        Cursor.visible   = false;
        Cursor.lockState = CursorLockMode.Locked;
        cam     = Camera.main;
        gameGUI = GameObject.Find("Canvas").GetComponentInChildren <gui>();

        GameObject floor = GameObject.FindGameObjectWithTag("Floor");

        floor.GetComponent <Renderer>().material.mainTexture.wrapMode = TextureWrapMode.Repeat;
        sensitivitySlider       = GameObject.FindObjectOfType <Slider>();
        sensitivitySlider.value = lookSensitivity;
    }
Exemplo n.º 4
0
        public void updateWindow(gui.Window window)
        {
            if(_settings.updateWindows)
            {
                _background.wait();

                _client.execute(() => Protocol.requestWindowUpdate(window, _connection));
                _requestGui();
            }
        }
Exemplo n.º 5
0
 showItems.Append(gui.LineBreak);