Esempio n. 1
0
    public override void MouseDown(MouseInputManager.MouseButton btn, MouseInputManager.MousePointer mouse, Interactable echo = null)
    {
        if (!btn.Equals(MouseInputManager.MouseButton.LEFT_BUTTON))
        {
            return;
        }
        if (echo)
        {
            return;
        }

        Debug.Log("down");
        if (!holdBy)
        {
            holdBy        = this;
            currentSpeed += speed;
            (Echo as RotateAround).currentSpeed            += speed;
            Echo.GetComponent <Button>().interactable       = false;
            (Echo as RotateAround).OtherButton.interactable = false;
        }
    }
Esempio n. 2
0
    public override void MouseUp(MouseInputManager.MouseButton btn, MouseInputManager.MousePointer mouse, Interactable echo = null)
    {
        if (!btn.Equals(MouseInputManager.MouseButton.LEFT_BUTTON))
        {
            return;
        }
        if (echo)
        {
            return;
        }
        Debug.Log("up");
        Debug.Log("=======");

        if (holdBy == this)
        {
            holdBy       = null;
            currentSpeed = 0;
            (Echo as RotateAround).currentSpeed             = 0;
            Echo.GetComponent <Button>().interactable       = true;
            (Echo as RotateAround).OtherButton.interactable = true;
        }
    }