Пример #1
0
        private void mouseWorldRaycast()
        {
            Ray        ray = new Ray(Camera.main.ScreenToWorldPoint(Input.mousePosition), rayDir * 100);
            RaycastHit hit;

            Physics.Raycast(ray, out hit);
            if (hit.collider)
            {
                EventDefine.CallEvent(EntityEvent.EVENT_TOUCH_DOWN, hit.collider.gameObject, hit.collider);
            }
        }
Пример #2
0
        private void mouseUIRaycast()
        {
            var mPointerEventData = new PointerEventData(eventSystem);

            mPointerEventData.position = Input.mousePosition;
            List <RaycastResult> results = new List <RaycastResult>();

            gra.Raycast(mPointerEventData, results);
            if (results.Count > 0)
            {
                EventDefine.CallEvent(UIEvent.EVENT_TOUCH_DOWN, results[0].gameObject, Input.mousePosition);
            }
        }
Пример #3
0
 protected virtual void Start()
 {
     EventDefine.CallEvent("GAME_START", System.DateTime.Now);
 }