UICamera.GetTouch C# (CSharp) 메소드

GetTouch() 정적인 공개 메소드

Get or create a touch event.
static public GetTouch ( int id ) : MouseOrTouch
id int
리턴 MouseOrTouch
	static public MouseOrTouch GetTouch (int id)
	{
		MouseOrTouch touch;

		if (!mTouches.TryGetValue(id, out touch))
		{
			touch = new MouseOrTouch();
			touch.touchBegan = true;
			mTouches.Add(id, touch);
		}
		return touch;
	}

Usage Example

예제 #1
0
        // Update is called once per frame
        private void Update()
        {
        #if !UNITY_EDITOR
            try
            {
        #endif

            if (canTouch)
            {
                if (null != buffer)
                {
                    var touch = UICamera.GetTouch(curTouchID);
                    if (null != touch)
                    {
                        buffer.UpdatePostion(touch.pos);
                    }
                }
            }

        #if !UNITY_EDITOR
        }

        catch (Exception ex)
        {
            Logger.Error(ex.ToString());
        }
        #endif
        }
All Usage Examples Of UICamera::GetTouch