/// シーンの破棄
        public void Term()
        {
            if (calCollGrav != null)
            {
                calCollGrav.Term();
            }
            if (moveCollMgr != null)
            {
                moveCollMgr.Term();
            }
            if (shapeMove != null)
            {
                shapeMove.Term();
            }
            if (renderSph != null)
            {
                renderSph.Dispose();
            }

///        trgObj            = null;
            renderSph   = null;
            shapeMove   = null;
            moveCollMgr = null;
            calCollGrav = null;
            useSceneMgr = null;
        }
        /// シーンの初期化
        public bool Init(DemoGame.SceneManager sceneMgr)
        {
            useSceneMgr = sceneMgr;

            calCollGrav = new ActorUnitCollGravity();
            calCollGrav.Init();

            moveCollMgr = new GameActorCollManager();
            moveCollMgr.Init();

            shapeMove = new ShapeSphere();
            shapeMove.Init(1);
            shapeMove.Set(0, StaticDataList.getVectorZero(), 0.001f);

            renderSph = new DemoGame.RenderGeometry();
            renderSph.MakeSphere();
///        trgObj        = null;

            /// 移動する自身のOBJを登録
            moveCollMgr.SetMoveShape(shapeMove);


            trgObjMoveSpd = 1.0f;
            setPlaceTypeParam(trgObjType);

            nowTaskId = debugMenuTaskId.SelectObj;
            changeTask(debugMenuTaskId.SelectObj);
            return(true);
        }
Beispiel #3
0
        /// デバック用
        ///---------------------------------------------------------------------------
        /// デバック用:描画
        public void Draw( DemoGame.GraphicsDevice graphDev, Rgba color )
        {
            DemoGame.RenderGeometry        drawTri = new DemoGame.RenderGeometry();
            drawTri.MakeTriangle();

            DemoGame.Camera camera = graphDev.GetCurrentCamera();

            for( int i=0; i<EntryNum; i++ ){
            drawTri.DrawTriangle( graphDev.Graphics, Triangle[i], camera, color );
            }

            drawTri        = null;
        }
Beispiel #4
0
/// デバック用
///---------------------------------------------------------------------------

        /// デバック用:描画
        public void Draw(DemoGame.GraphicsDevice graphDev, Rgba color)
        {
            DemoGame.RenderGeometry drawTri = new DemoGame.RenderGeometry();
            drawTri.MakeTriangle();

            DemoGame.Camera camera = graphDev.GetCurrentCamera();

            for (int i = 0; i < EntryNum; i++)
            {
                drawTri.DrawTriangle(graphDev.Graphics, Triangle[i], camera, color);
            }

            drawTri = null;
        }
Beispiel #5
0
        /// private メソッド
        ///---------------------------------------------------------------------------
        /// デバック用
        ///---------------------------------------------------------------------------
        /// デバック用:描画
        public void Draw( DemoGame.GraphicsDevice graphDev, int hitIdx, Rgba color1, Rgba color2 )
        {
            DemoGame.RenderGeometry        drawSph = new DemoGame.RenderGeometry();
            drawSph.MakeCapsule();

            DemoGame.Camera camera = graphDev.GetCurrentCamera();

            if( hitIdx < 0 ){
            drawSph.DrawCapsule( graphDev.Graphics, this.Capsule, camera, color1 );
            }
            else{
            drawSph.DrawCapsule( graphDev.Graphics, this.Capsule, camera, color2 );
            }

            drawSph        = null;
        }
Beispiel #6
0
/// private メソッド
///---------------------------------------------------------------------------



/// デバック用
///---------------------------------------------------------------------------

        /// デバック用:描画
        public void Draw(DemoGame.GraphicsDevice graphDev, int hitIdx, Rgba color1, Rgba color2)
        {
            DemoGame.RenderGeometry drawSph = new DemoGame.RenderGeometry();
            drawSph.MakeSphere();

            DemoGame.Camera camera = graphDev.GetCurrentCamera();

            if (hitIdx < 0)
            {
                drawSph.DrawSphere(graphDev.Graphics, this.Sphre, camera, color1);
            }
            else
            {
                drawSph.DrawSphere(graphDev.Graphics, this.Sphre, camera, color2);
            }

            drawSph = null;
        }
        /// シーンの破棄
        public void Term()
        {
            if( calCollGrav != null ){
            calCollGrav.Term();
            }
            if( moveCollMgr != null ){
            moveCollMgr.Term();
            }
            if( shapeMove != null ){
            shapeMove.Term();
            }
            if( renderSph != null ){
            renderSph.Dispose();
            }

            ///        trgObj            = null;
            renderSph        = null;
            shapeMove        = null;
            moveCollMgr        = null;
            calCollGrav        = null;
            useSceneMgr        = null;
        }
        /// シーンの初期化
        public bool Init( DemoGame.SceneManager sceneMgr )
        {
            useSceneMgr = sceneMgr;

            calCollGrav    = new ActorUnitCollGravity();
            calCollGrav.Init();

            moveCollMgr = new GameActorCollManager();
            moveCollMgr.Init();

            shapeMove = new ShapeSphere();
            shapeMove.Init(1);
            shapeMove.Set( 0, StaticDataList.getVectorZero(), 0.001f );

            renderSph = new DemoGame.RenderGeometry();
            renderSph.MakeSphere();
            ///        trgObj        = null;

            /// 移動する自身のOBJを登録
            moveCollMgr.SetMoveShape( shapeMove );

            trgObjMoveSpd = 1.0f;
            setPlaceTypeParam( trgObjType );

            nowTaskId    = debugMenuTaskId.SelectObj;
            changeTask( debugMenuTaskId.SelectObj );
            return true;
        }