Beispiel #1
0
    void Update()
    {
        if (Input.GetMouseButtonUp(0))
        {
            if (Application.isEditor && Input.GetKeyUp(KeyCode.Alpha0))
            {
                Cheat = !Cheat;
            }
            if (!HumanInput())
            {
                return;
            }

            if (inFocus && !RC_Camera.CameraActionInProgress())
            {
                Select();
            }
        }
    }
Beispiel #2
0
    public void OnPointerClick(PointerEventData eventData)
    {
        MDebug.Log(gameObject.name + " focus " + inFocus);
        if (Input.GetKeyUp(KeyCode.Alpha0))
        {
            Cheat = !Cheat;
        }
        if (!HumanInput())
        {
            return;
        }

        if (inFocus && !RC_Camera.HasBlockingAction())
        {
            Select();
        }
        else
        {
            MDebug.Log("asdsd");
        }
    }
Beispiel #3
0
    IEnumerator SelectionThread()
    {
        GameObject ActiveObject = LastTouchObject;


        while (Input.GetButton("Fire1"))
        {
            if (RC_Camera.HasBlockingAction())
            {
                yield break;
            }

            if (Cast())
            {
                LastTouchObject.SendMessage("TouchHold", LastHitPosition, SendMessageOptions.DontRequireReceiver);
            }
            ActiveObject = LastTouchObject;
            yield return(null);
        }

        if (RC_Camera.HasBlockingAction())
        {
            yield break;
        }

        MDebug.Log("Selection Thread End");
        if (ActiveObject != null)
        {
            MDebug.Log("Send Touchup to " + ActiveObject.name);
            ActiveObject.SendMessage("TouchUp", SendMessageOptions.DontRequireReceiver);
        }
        else
        {
            UnselectCurrent();
        }
    }
Beispiel #4
0
    /* Functions */
    private void Awake()
    {
        instance = this;

        mJCSCamera = this.GetComponent <JCS_2DCamera>();
    }