本文整理汇总了C#中Device.getInternalName方法的典型用法代码示例。如果您正苦于以下问题:C# Device.getInternalName方法的具体用法?C# Device.getInternalName怎么用?C# Device.getInternalName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Device
的用法示例。
在下文中一共展示了Device.getInternalName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: addToReactionEngine
private void addToReactionEngine(Device device) {
Logger.Log("Equipment::addToReactionEngine reactions from device "+device.getInternalName()+" ("+device.ToString ()+")", Logger.Level.TRACE);
LinkedList<IReaction> reactions = device.getReactions();
Logger.Log("Equipment::addToReactionEngine reactions="+Logger.ToString<IReaction>(reactions)+" from "+device, Logger.Level.INFO);
foreach (IReaction reaction in reactions) {
Logger.Log("Equipment::addToReactionEngine adding reaction="+reaction, Logger.Level.TRACE);
_reactionEngine.addReactionToMedium(_celliaMediumID, reaction);
}
}
示例2: askAddDevice
public override AddingResult askAddDevice(Device device, bool reportToRedMetrics = false)
{
Logger.Log("Inventory::askAddDevice", Logger.Level.TRACE);
AddingResult addingResult = canAddDevice(device);
if (addingResult == AddingResult.SUCCESS)
{
Logger.Log("Inventory::askAddDevice: AddingResult.SUCCESS, will add device=" + device, Logger.Level.INFO);
addDevice(device);
if (reportToRedMetrics)
{
RedMetricsManager.get().sendEvent(TrackingEvent.CRAFT, new CustomData(CustomDataTag.DEVICE, device.getInternalName()));
}
//uncomment to save user-created devices
//TODO FIXME uncommenting this entails bugs on loading devices from _saveFilePath
//DeviceSaver dSaver = new DeviceSaver();
//dSaver.saveDevicesToFile(_devices, _saveFilePathWrite);
}
else
{
Logger.Log("Inventory::askAddDevice: " + addingResult + ", didn't add device=" + device, Logger.Level.INFO);
}
return addingResult;
}
示例3: buildDevice
//copy factory
public static Device buildDevice(Device device)
{
if (device == null)
{
Logger.Log("Device::buildDevice device == null", Logger.Level.WARN);
return null;
}
return buildDevice(device.getInternalName(), device._modules);
}
示例4: displayTooltip
public static bool displayTooltip(bool isOver, Device device, Vector3 pos)
{
string code = (null == device)?null:_devicePrefix+device.getInternalName();
return displayTooltip(isOver, code, pos);
}