Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        //Initialise the mesh renderer with the play material
        meshRenderer          = GetComponent <MeshRenderer>();
        meshRenderer.material = playMaterial;

        //Get the serverclient object
        server = GameObject.Find("ServerClient").GetComponent <ServerClientScript>();
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        //Initialize it
        server = GameObject.Find("ServerClient").GetComponent <ServerClientScript>();

        //Since the bar will be moving and the whole music object can be moved, we can not use that for the start location.
        //Therefore the moving bar is located inside an empty object that stays on the start location at all times.
        begin = this.transform.parent.position;
    }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        Instance = this;

        //Initialize it
        server = GameObject.Find("ServerClient").GetComponent <ServerClientScript>();

        // Set up a GestureRecognizer to detect Select gestures.
        recognizer         = new GestureRecognizer();
        recognizer.Tapped += (args) =>
        {
            // Send an OnSelect message to the focused object and its ancestors.
            if (FocusedObject != null)
            {
                FocusedObject.SendMessageUpwards("OnSelect", SendMessageOptions.DontRequireReceiver);
                //Switch the placing bool
                placing = !placing;
                //Let the server know that an object has been tapped.
                server.writeString(FocusedObject.name + " tapped");
            }
        };
        recognizer.StartCapturingGestures();
    }
Ejemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     //Initialize it
     server = GameObject.Find("ServerClient").GetComponent <ServerClientScript>();
 }