コード例 #1
0
ファイル: CameraMan.cs プロジェクト: RenaudWasTaken/SkyLands
        private void UpdateKeys(float frameTime, Controller input)
        {
            this.mDirectionFactor = input.MovementFactor;
            this.FastMove = input.IsActionOccuring(UserAction.Sprint);

            this.MouseMovement(frameTime, input.Yaw, input.Pitch);
        }
コード例 #2
0
ファイル: CameraMan.cs プロジェクト: RenaudWasTaken/SkyLands
        public void UpdateCamera(float frameTime, Controller input = null)
        {
            if (input != null) { this.UpdateKeys(frameTime, input); }
            if (this.mFreeze) { return; }

            Vector3 move = Vector3.ZERO;
            move += this.mCamera.Direction * this.mDirectionFactor.z;
            move -= this.mCamera.Right * this.mDirectionFactor.x;
            move += this.mCamera.Up * this.mDirectionFactor.y;

            move.Normalise();

            move *= 800;
            if (this.mFastMove) { move *= 6; }
            if (move != Vector3.ZERO) { this.mCamera.Move(move * frameTime); }
        }
コード例 #3
0
ファイル: OgreForm.cs プロジェクト: RenaudWasTaken/SkyLands
        public bool Setup()
        {
            this.mRoot = new Root(PLUGINS_CFG);

            if(!this.Configure()) { return false; }

            this.ChooseSceneManager();
            this.CreateCamera();
            this.CreateViewports();

            TextureManager.Singleton.DefaultNumMipmaps = 5;

            this.LoadResources();

            int windowHnd;
            this.mWindow.GetCustomAttribute("WINDOW", out windowHnd);
            this.mController = new Controller(this, windowHnd);

            MaterialManager.Singleton.SetDefaultTextureFiltering(TextureFilterOptions.TFO_NONE);

            this.AddFrameLstn(new RootLstn(TypeLstn.FrameRendering, this.OnFrameRendering));

            GraphicBlock.generateFace();
            LogManager.Singleton.DefaultLog.LogMessage("***********************Program\'s Log***********************");
            //LogManager.Singleton.DefaultLog.LogDetail = LoggingLevel.LL_LOW;

            this.mSceneMgr.ShadowFarDistance = 400;
            Game.World.Display.ColoredMaterials.Init();

            this.Resize += this.OgreForm_Resize;

            return true;
        }
コード例 #4
0
ファイル: Sinbad.cs プロジェクト: RenaudWasTaken/SkyLands
 public void UpdateEmotes(Controller controller)
 {
     if (this.AnimMgr.AreAnimationsPlaying(GetString(AnimName.JumpStart, AnimName.JumpLoop, AnimName.JumpEnd,
                                                     AnimName.RunBase, AnimName.RunTop))) { return; }
     foreach (Emote emote in this.mEmotes.Where(emote => controller.HasActionOccured(emote.Action)))
     {
         string[] names = GetString(emote.Anim);
         if (!this.AnimMgr.AreAnimationsPlaying(names))
             this.AnimMgr.SetAnims(names);
         else
             this.AnimMgr.DeleteAnims(names);
     }
 }