Ejemplo n.º 1
0
        //called once
        private void Start()
        {
            //Debug.Log("Hello, World!");
            this.mGrid = new JSIGrid();

            // new JSIAppRect3D("TestRect3D", 1.0f, 2.0f,
            //     new Color(0.5f, 0.0f, 0.0f, 0.5f));
            // new JSIAppCircle3D("TestCircle3D", 1.0f,
            //     new Color(0.0f, 0.5f, 0.0f, 0.5f));
            // new JSIStandingCard("TestStandingCard", 1.0f, 2.0f,
            //     new Vector3(0.0f, 1.0f, 0.0f), Quaternion.identity, null);

            this.mPerspCameraPerson = new JSIPerspCameraPerson();

            this.mPenMarkMgr      = new JSIPenMarkMgr();
            this.mStandingCardMgr = new JSIStandingCardMgr();
            this.mScenarioMgr     = new JSIScenarioMgr(this);
            this.mLogMgr          = new XLogMgr();
            mLogMgr.setPrintOn(true);

            this.mKeyEventSource   = new JSIKeyEventSource();
            this.mMouseEventSource = new JSIMouseEventSource();
            this.mEventListener    = new JSIEventListener(this);

            this.mKeyEventSource.setEventListener(this.mEventListener);
            this.mMouseEventSource.setEventListener(this.mEventListener);
        }
Ejemplo n.º 2
0
        // methods
        public bool hits(JSIAppGeom3D appGeom3D)
        {
            Vector2 ctr             = this.mGameObject.transform.position;
            JSIPerspCameraPerson cp = this.mApp.getPerspCameraPerson();
            Ray        ray          = cp.getCamera().ScreenPointToRay(ctr);
            RaycastHit hit;
            Collider   collider = appGeom3D.getCollider();

            if (collider.Raycast(ray, out hit, Mathf.Infinity))
            {
                JSIUtil.createDebugSphere(hit.point);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 3
0
        //called once
        private void Start()
        {
            //Debug.Log("Hello, World!");
            this.mGrid = new JSIGrid();

            new JSIAppRect3D("TestRect3D", 1.0f, 2.0f,
                             new Color(0.5f, 0.0f, 0.0f, 0.5f));
            new JSIAppCircle3D("TestCircle3D", 1.0f,
                               new Color(0.0f, 0.5f, 0.0f, 0.5f));

            this.mPerspCameraPerson = new JSIPerspCameraPerson();
            ////////////
            this.mPenMarkMgr  = new JSIPenMarkMgr();
            this.mScenarioMgr = new JSIScenarioMgr(this);
            this.mLogMgr      = new XLogMgr();
            mLogMgr.setPrintOn(true);

            this.mKeyEventSource   = new JSIKeyEventSource();
            this.mMouseEventSource = new JSIMouseEventSource();
            this.mEventListener    = new JSIEventListener(this);

            this.mKeyEventSource.setEventListener(this.mEventListener);
            this.mMouseEventSource.setEventListener(this.mEventListener);
        }