本文整理汇总了C#中ICore.GetService方法的典型用法代码示例。如果您正苦于以下问题:C# ICore.GetService方法的具体用法?C# ICore.GetService怎么用?C# ICore.GetService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICore
的用法示例。
在下文中一共展示了ICore.GetService方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UIView
public UIView(ICore core, UIType menuType, int width, int height, UIFlags flags, bool transparent)
: base(core)
{
webCore = core.GetService<IUIManagerService>().GetWebCore();
this.menuType = menuType;
this.width = width;
this.height = height;
this.flags = flags;
this.isTransparent = transparent;
isLoading = false;
pageLoaded = false;
webTextureID = TextureFactory.CreateTexture(width, height, isTransparent);
hudPosX = 0;
hudPosY = 0;
hud = new TVScreen2DImmediate();
Keyboard = core.GetService<IKeyboardService>();
Mouse = core.GetService<IMouseService>();
JoyStick = core.GetService<IJoyStickService>();
Gamepad = core.GetService<IGamepadsService>();
CanculateHudPosition(flags);
View = webCore.CreateWebView(width, height, isTransparent, true);
View.OnFinishLoading += OnFinishLoading;
View.OnCallback += OnCallback;
View.Focus();
buttonClickSound = Core.GetService<ISoundManagerService>().Load2DSound(Path.Combine(Application.StartupPath, @"Data\Sounds\menu\button_click.mp3"));
buttonFocusSound = Core.GetService<ISoundManagerService>().Load2DSound(Path.Combine(Application.StartupPath, @"Data\Sounds\menu\button_focus.mp3"));
Core.GetService<ISoundManagerService>().SetVolume(buttonClickSound, 0.5f);
Core.GetService<ISoundManagerService>().SetVolume(buttonFocusSound, 0.5f);
}