本文整理汇总了C#中IInput.Configure方法的典型用法代码示例。如果您正苦于以下问题:C# IInput.Configure方法的具体用法?C# IInput.Configure怎么用?C# IInput.Configure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IInput
的用法示例。
在下文中一共展示了IInput.Configure方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
void Init(IntPtr pParam)
{
IEngineSubSystem pSubSys;
pEngineCore.GetSubSystem(E_ENGINE_SUB_SYSTEM.ESS_RENDER, out pSubSys);
pRender = (IRender)pSubSys;
pRender.GetRender2D(out pRender2D);
pEngineCore.GetSubSystem(E_ENGINE_SUB_SYSTEM.ESS_INPUT, out pSubSys);
pInput = (IInput)pSubSys;
pInput.Configure(E_INPUT_CONFIGURATION_FLAGS.ICF_HIDE_CURSOR);
IResourceManager pResMan;
pEngineCore.GetSubSystem(E_ENGINE_SUB_SYSTEM.ESS_RESOURCE_MANAGER, out pSubSys);
pResMan = (IResourceManager)pSubSys;
IEngineBaseObject pBaseObj;
pResMan.Load(RESOURCE_PATH + "sounds\\bug_death.wav", out pBaseObj, 0);
pSndDeath = (ISoundSample)pBaseObj;
pResMan.Load(RESOURCE_PATH + "sprites\\light.jpg", out pBaseObj, 0);
pTexLight = (ITexture)pBaseObj;
pResMan.Load(RESOURCE_PATH + "sprites\\smoke.png", out pBaseObj, 0);
pTexSmoke = (ITexture)pBaseObj;
pResMan.Load(RESOURCE_PATH + "sprites\\bug.png", out pBaseObj, 0);
pTexBug = (ITexture)pBaseObj;
pResMan.Load(RESOURCE_PATH + "sprites\\bug_corpse.png", out pBaseObj, 0);
pTexBugCorpse = (ITexture)pBaseObj;
pResMan.Load(RESOURCE_PATH + "sprites\\blood.png", out pBaseObj, 0);
pTexBlood = (ITexture)pBaseObj;
pResMan.Load(RESOURCE_PATH + "textures\\cartoon_grass.tga", out pBaseObj, (uint)(E_TEXTURE_LOAD_FLAGS.TLF_FILTERING_BILINEAR |
E_TEXTURE_LOAD_FLAGS.TLF_COORDS_REPEAT));
pTexBg = (ITexture)pBaseObj;
pTexBug.SetFrameSize(52, 42);
for (uint i = 0; i < 3; i++)
{
pResMan.CreateTexture(out pTexTarget[i], null, ScreenWidth, ScreenHeight,
E_TEXTURE_DATA_FORMAT.TDF_RGB8, E_TEXTURE_CREATE_FLAGS.TCF_DEFAULT,
E_TEXTURE_LOAD_FLAGS.TLF_FILTERING_BILINEAR | E_TEXTURE_LOAD_FLAGS.TLF_COORDS_CLAMP);
}
Clear();
}
示例2: Init
void Init(IntPtr pParam)
{
IRender pRender;
IEngineSubSystem pSubSys;
pEngineCore.GetSubSystem(E_ENGINE_SUB_SYSTEM.ESS_RENDER, out pSubSys);
pRender = (IRender)pSubSys;
pRender.GetRender2D(out pRender2D);
// All game logic is developed for this screen resolution, so will keep it (on logical level).
pRender2D.SetResolutionCorrection(Res.GameVpWidth, Res.GameVpHeight);
pEngineCore.GetSubSystem(E_ENGINE_SUB_SYSTEM.ESS_INPUT, out pSubSys);
pInput = (IInput)pSubSys;
pInput.Configure(E_INPUT_CONFIGURATION_FLAGS.ICF_HIDE_CURSOR);
IResourceManager pResMan;
pEngineCore.GetSubSystem(E_ENGINE_SUB_SYSTEM.ESS_RESOURCE_MANAGER, out pSubSys);
pResMan = (IResourceManager)pSubSys;
// Load resources and give them names to use in future via resource manager.
IEngineBaseObject pBaseObj;
pResMan.Load(ResPath + "meshes\\planets\\planet.dmd", out pBaseObj, (uint)E_MESH_MODEL_LOAD_FLAGS.MMLF_FORCE_MODEL_TO_MESH, Res.MeshPlanet);
pResMan.Load(ResPath + "meshes\\planets\\clouds.jpg", out pBaseObj, (uint)E_TEXTURE_LOAD_FLAGS.TEXTURE_LOAD_DEFAULT_3D, Res.TexClouds);
pResMan.Load(ResPath + "meshes\\planets\\earth.jpg", out pBaseObj, (uint)E_TEXTURE_LOAD_FLAGS.TEXTURE_LOAD_DEFAULT_3D, Res.TexPlanet);
pResMan.Load(ResPath + "sprites\\space_bg.jpg", out pBaseObj, (uint)E_TEXTURE_LOAD_FLAGS.TEXTURE_LOAD_DEFAULT_2D, Res.TexStars);
pResMan.Load(ResPath + "meshes\\planets\\asteroid.dmd", out pBaseObj, (uint)E_MESH_MODEL_LOAD_FLAGS.MMLF_FORCE_MODEL_TO_MESH, Res.MeshAsteroid);
pResMan.Load(ResPath + "meshes\\planets\\asteroid.jpg", out pBaseObj, (uint)E_TEXTURE_LOAD_FLAGS.TEXTURE_LOAD_DEFAULT_3D, Res.TexAsteroid);
pResMan.Load(ResPath + "meshes\\space_ship\\ship.dmd", out pBaseObj, (uint)E_MESH_MODEL_LOAD_FLAGS.MMLF_FORCE_MODEL_TO_MESH, Res.MeshShip);
pResMan.Load(ResPath + "meshes\\space_ship\\ship.jpg", out pBaseObj, (uint)E_TEXTURE_LOAD_FLAGS.TEXTURE_LOAD_DEFAULT_3D, Res.TexShip);
pResMan.Load(ResPath + "sprites\\spark.bmp", out pBaseObj, (uint)E_TEXTURE_LOAD_FLAGS.TEXTURE_LOAD_DEFAULT_2D, Res.TexSpark);
pResMan.Load(ResPath + "sounds\\explo.wav", out pBaseObj, (uint)E_TEXTURE_LOAD_FLAGS.RES_LOAD_DEFAULT, Res.SndExplo);
pResMan.Load(ResPath + "sounds\\fire.wav", out pBaseObj, (uint)E_TEXTURE_LOAD_FLAGS.RES_LOAD_DEFAULT, Res.SndFire);
pResMan.Load(ResPath + "sprites\\explo.jpg", out pBaseObj, (uint)E_TEXTURE_LOAD_FLAGS.TEXTURE_LOAD_DEFAULT_2D,
Res.TexExplo);
((ITexture)pBaseObj).SetFrameSize(Res.ExploAnimationFramesSize, Res.ExploAnimationFramesSize);
pResMan.Load(ResPath + "fonts\\Times_New_Roman_18_Bold.dft", out pBaseObj, 0, Res.FntMain);
pFnt = (IBitmapFont)pBaseObj;
StartGame();
}