コード例 #1
0
ファイル: TouchTrackPad.cs プロジェクト: moh76/pro_test
        // ------------------
        override public bool OnTouchStart(TouchObject touchObj, TouchControl sender, TouchStartType touchStartType)
        {
            if (this.touchObj != null)
            {
                return(false);
            }

            this.touchObj       = touchObj;
            this.touchStartType = touchStartType;
            this.touchObj.AddControl(this);

            Vector2 localPos = this.ScreenToOrientedPos(touchObj.screenPosStart, touchObj.cam);

            this.touchState.OnTouchStart(localPos, localPos, 0, touchObj.IsMouse());

            return(true);
        }
コード例 #2
0
        // ------------------
        override public bool OnTouchStart(TouchObject touchObj, TouchControl sender, TouchStartType touchStartType)
        {
            if (this.touchObj != null)
            {
                return(false);
            }

//Debug.LogFormat("----------------Track pad start : {0} : active:{1}", Time.frameCount, this.IsActive());

            this.touchObj       = touchObj;
            this.touchStartType = touchStartType;
            this.touchObj.AddControl(this);

            Vector2 localPos = this.ScreenToOrientedPos(touchObj.screenPosStart, touchObj.cam);

            this.touchState.OnTouchStart(localPos, localPos, 0, touchObj);

            return(true);
        }