本文整理汇总了C#中Core.GetPlugin方法的典型用法代码示例。如果您正苦于以下问题:C# Core.GetPlugin方法的具体用法?C# Core.GetPlugin怎么用?C# Core.GetPlugin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core
的用法示例。
在下文中一共展示了Core.GetPlugin方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: JoystickActivatedTrigger
public JoystickActivatedTrigger(Core coordinator, XmlNode node)
: base(coordinator, GetName(node, "Joystick Activated Trigger"))
{
mCoordinator = coordinator;
if (mCoordinator.HasPlugin<XBoxControllerPlugin>()) {
mPlugin = mCoordinator.GetPlugin<XBoxControllerPlugin>();
mInitialised = true;
}
}
示例2: Init
public void Init(Core core)
{
if (!core.HasPlugin<OverlayPlugin>()) {
Logger.Warn("Unable to initialise MousePlugin. No OverlayPlugin registered with the coordinator.");
} else {
mOverlayPlugin = core.GetPlugin<OverlayPlugin>();
mCore = core;
}
//if (mEnabled)
//core.Tick += mTickListener;
}
示例3: Init
public void Init(Core core)
{
if (!core.HasPlugin<OverlayPlugin>()) {
//throw new ArgumentException("Unable to load kinect cursor. Overlay plugin is not loaded.");
Logger.Warn("Unable to load axis cursor. Overlay plugin is not loaded.");
Init();
return;
}
mOverlayPlugin = core.GetPlugin<OverlayPlugin>();
if (core.HasFrame(mWindow)) {
mManager = mOverlayPlugin[mWindow];
} else {
mWindowAddedListener = new Action<Chimera.Frame, EventArgs>(coordinator_WindowAdded);
core.FrameAdded += mWindowAddedListener;
}
Init();
}
示例4: Init
public void Init(Core core)
{
mCore = core;
config = new KinectDisableConfig();
Key = config.DisableKey;
log = LogManager.GetLogger("KinectDisable");
hotkey = new Hotkey();
hotkey.KeyCode = Key;
hotkey.Pressed += new HandledEventHandler(hostkey_keypressed);
if(mCore.HasPlugin<KinectMovementPlugin>())
mInput = mCore.GetPlugin<KinectMovementPlugin>();
if(mCore.HasPlugin<SimpleKinectCursor>())
mCursor = mCore.GetPlugin<SimpleKinectCursor>();
}
示例5: Init
public void Init(Core core)
{
mCore = core;
mMainController = mCore.GetPlugin<OpenSimController>();
mMainController.ClientLoginComplete += new EventHandler(mMainController_CLientLoginComplete);
mCore.ControlMode = mConfig.Mode;
if (mCore.HasPlugin<ClientRecorderPlugin>())
mRecorder = mCore.GetPlugin<ClientRecorderPlugin>();
if (!mConfig.SettingsLoaderEnabled || !mCore.HasPlugin<SettingLoaderPlugin>())
Logger.Info("Setting Settings file: " + mConfig.SettingsFile + ".");
Logger.Info("Setting Region: " + mConfig.Region + ".");
foreach (var frame in core.Frames) {
ViewerConfig config = (frame.Output as OpenSimController).Config as ViewerConfig;
if (!mConfig.SettingsLoaderEnabled || !mCore.HasPlugin<SettingLoaderPlugin>())
SettingLoaderPlugin.ReplaceSettingsFile(config, mConfig.SettingsFile, mConfig, Logger);
config.ViewerArguments += " --set LoginLocation \"" + mConfig.Region + "\"";
}
LoadTargets();
}
示例6: Init
public void Init(Core coordinator)
{
if (!coordinator.HasPlugin<OverlayPlugin>())
return;
mOverlay = coordinator.GetPlugin<OverlayPlugin>();
foreach (var state in mOverlay.States)
mStatistics.Add(state.Name, new TickStatistics());
if (mOverlay.CurrentState != null)
StateActivated(mOverlay.CurrentState);
mOverlay.StateChanged += new Action<Overlay.State>(StateActivated);
}
示例7: Init
public override void Init(Core input)
{
base.Init(input);
if (input.HasPlugin<OverlayPlugin>()) {
mOverlayPlugin = input.GetPlugin<OverlayPlugin>();
}
if (input.Frames.Count() == 0)
input.FrameAdded += new Action<Frame, EventArgs>(input_FrameAdded);
else {
mFrame = input.Frames.First();
if (mConfig.Frame != null)
mFrame = input[mConfig.Frame];
input_FrameAdded(mFrame, null);
}
}