• 大小: 6.65MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-25
  • 语言: 其他
  • 标签:

资源简介

基于OGRE实现的小游戏Wii_Bowling(保龄球)

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Mogre;

namespace Bowling
{
    public abstract class Basis
    {
        public static void ShowOgreException()
        {
            if (OgreException.IsThrown)
                System.Windows.Forms.MessageBox.Show(OgreException.LastException.FullDescription “An exception has occured!“ System.Windows.Forms.MessageBoxButtons.OK System.Windows.Forms.MessageBoxIcon.Error);
        }

        protected Root root;
        protected Camera camera;
        protected Viewport viewport;
        protected SceneManager sceneMgr;
        protected RenderWindow window;
        protected Overlay debugOverlay;
        protected MOIS.InputManager inputManager;
        protected MOIS.Keyboard inputKeyboard;
        protected MOIS.Mouse inputMouse;

        protected bool showDebugOverlay = true;
        protected float debugTextDelay = 0.0f;
        protected float toggleDelay = 1.0f;
        protected float statDelay = 0.0f;
        protected TextureFilterOptions filtering = TextureFilterOptions.TFO_BILINEAR;
        protected uint aniso = 1;
        protected float camSpeed = 100f;
        protected Degree rotateSpeed = 36;

        protected bool shutDown = false;
        protected string mDebugText;


        //Do NOT call root.Dispose at the finalizer thread because GL renderer requires that disposing of its objects is made
        //in the same thread as the thread that created the GL renderer.
        //~ExampleApplication()
        //{
        //    if (root != null)
        //    {
        //        root.Dispose();
        //        root = null;
        //    }
        //}

        public virtual void Go()
        {
            if (!Setup())
                return;

            root.StartRendering();

            // clean up
            DestroyScene();

            root.Dispose();
            root = null;
        }

        public virtual bool Setup()
        {
            root = new Root();

            SetupResources();
            //bool carryOn = root.RestoreConfig();
            bool carryOn = Configure();
            //if (!carryOn) return false;

            ChooseSceneManager();
            CreateCamera();
            CreateViewports();

            // Set default mipmap level (NB some APIs ignore this)
            TextureManager.Singleton.DefaultNumMipmaps = 5;

            // Create any resource listeners (for loading screens)
            CreateResourceListener();
            // Load resources
            LoadResources();

            // Create the scene
            CreateScene();

            CreateframeListener();

            CreateInput();

            return true;

        }

        /// 
        /// Configures the application - returns false if the user chooses to abandon configuration.
        /// 

        public virtual bool Configure()

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2009-04-16 17:45  Bowling\
     目录           0  2009-04-16 17:57  Bowling\bin\
     文件       32768  2009-04-16 17:57  Bowling\bin\Bowling.exe
     文件       28160  2009-04-16 17:19  Bowling\bin\Bowling.pdb
     文件     2449408  2007-12-13 00:22  Bowling\bin\cg.dll
     目录           0  2009-04-16 18:26  Bowling\bin\Custom\
     文件       90344  2009-03-30 13:16  Bowling\bin\Custom\1_floor-bamboo.jpg
     文件         920  2009-03-30 13:15  Bowling\bin\Custom\1_metal_Seamed.jpg
     文件         920  2009-03-30 13:16  Bowling\bin\Custom\2_metal_Seamed.jpg
     文件        1095  2009-03-30 13:56  Bowling\bin\Custom\bfloor.material
     文件       57525  2009-03-30 13:55  Bowling\bin\Custom\bfloor.mesh
     文件       32414  2009-03-25 18:36  Bowling\bin\Custom\bowlingball.jpg
     文件        8378  2009-03-25 18:25  Bowling\bin\Custom\bowlingenv.jpg
     文件         605  2009-03-26 19:45  Bowling\bin\Custom\BowlPin.material
     文件       19870  2003-09-08 22:44  Bowling\bin\Custom\cloudy_noon_BK.jpg
     文件        7873  2003-09-08 22:44  Bowling\bin\Custom\cloudy_noon_DN.jpg
     文件       18217  2003-09-08 22:44  Bowling\bin\Custom\cloudy_noon_FR.jpg
     文件       23249  2003-09-08 22:44  Bowling\bin\Custom\cloudy_noon_LF.jpg
     文件       18901  2003-09-08 22:44  Bowling\bin\Custom\cloudy_noon_RT.jpg
     文件       28937  2003-09-08 22:44  Bowling\bin\Custom\cloudy_noon_UP.jpg
     文件         555  2009-03-25 15:39  Bowling\bin\Custom\floor.material
     文件      657695  2009-04-16 18:25  Bowling\bin\Custom\Mesh.mesh
     文件      657731  2009-03-27 19:40  Bowling\bin\Custom\Mesh_O.mesh
     文件      238429  2009-03-25 19:43  Bowling\bin\Custom\pin.mesh
     文件         808  2009-03-30 18:39  Bowling\bin\Custom\Scene.material
     文件       30720  2009-04-16 17:20  Bowling\bin\Custom\Thumbs.db
     文件         323  2008-05-13 05:15  Bowling\bin\media.cfg
     文件     8190464  2008-05-14 05:07  Bowling\bin\Mogre.dll
     文件      201728  2008-05-15 03:48  Bowling\bin\MogreNewt.dll
     文件      348160  2007-12-17 05:12  Bowling\bin\MOIS.dll
     文件      446464  2006-05-25 03:32  Bowling\bin\Newton.dll
............此处省略75个文件信息

评论

共有 条评论

相关资源