本文整理汇总了C#中Logger.debugLog方法的典型用法代码示例。如果您正苦于以下问题:C# Logger.debugLog方法的具体用法?C# Logger.debugLog怎么用?C# Logger.debugLog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Logger
的用法示例。
在下文中一共展示了Logger.debugLog方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Waypoint
public Waypoint(Mover mover, AllNavigationSettings navSet, AllNavigationSettings.SettingsLevelName level, IMyEntity targetEntity, Vector3D worldOffset)
: base(mover, navSet)
{
this.m_logger = new Logger(GetType().Name, m_controlBlock.CubeBlock);
this.m_level = level;
this.m_targetEntity = targetEntity;
this.m_targetOffset = worldOffset;
m_logger.debugLog(targetEntity != targetEntity.GetTopMostParent(), "targetEntity is not top-most", Logger.severity.FATAL);
IMyCubeGrid asGrid = targetEntity as IMyCubeGrid;
if (asGrid != null && Attached.AttachedGrid.IsGridAttached(asGrid, m_controlBlock.CubeGrid, Attached.AttachedGrid.AttachmentKind.Physics))
{
m_logger.debugLog("Cannot fly to entity, attached: " + targetEntity.getBestName() + ", creating GOLIS", Logger.severity.WARNING);
new GOLIS(mover, navSet, TargetPosition, level);
return;
}
if (targetEntity.Physics == null)
{
m_logger.debugLog("Target has no physics: " + targetEntity.getBestName() + ", creating GOLIS", Logger.severity.WARNING);
new GOLIS(mover, navSet, TargetPosition, level);
return;
}
var setLevel = navSet.GetSettingsLevel(level);
setLevel.NavigatorMover = this;
//setLevel.DestinationEntity = mover.Block.CubeBlock; // to force avoidance
m_logger.debugLog("created, level: " + level + ", target: " + targetEntity.getBestName() + ", target position: " + targetEntity.GetPosition() + ", offset: " + worldOffset + ", position: " + TargetPosition, Logger.severity.DEBUG);
}
示例2: WeldGrid
public WeldGrid(Mover mover, AllNavigationSettings navSet, string gridName, bool shopAfter)
: base(mover, navSet)
{
this.m_logger = new Logger(GetType().Name, mover.Block.CubeBlock);
this.m_finder = new GridFinder(navSet, m_controlBlock, gridName);
this.m_shopAfter = shopAfter;
PseudoBlock navBlock = m_navSet.Settings_Current.NavigationBlock;
if (navBlock.Block is IMyShipWelder)
m_navWeld = new MultiBlock<MyObjectBuilder_ShipWelder>(navBlock.Block);
else
{
CubeGridCache cache = CubeGridCache.GetFor(m_controlBlock.CubeGrid);
if (cache == null)
{
m_logger.debugLog("failed to get cache", Logger.severity.WARNING);
return;
}
if (cache.CountByType(typeof(MyObjectBuilder_ShipWelder)) < 1)
{
m_logger.debugLog("no welders on ship", Logger.severity.WARNING);
return;
}
m_navWeld = new MultiBlock<MyObjectBuilder_ShipWelder>(() => m_mover.Block.CubeGrid);
}
UpdateTimeout();
m_navSet.Settings_Task_NavMove.NavigatorMover = this;
}
示例3: Coward
public Coward(Mover mover, AllNavigationSettings navSet)
: base(mover, navSet)
{
this.m_logger = new Logger(GetType().Name, () => m_controlBlock.CubeGrid.DisplayName);
m_logger.debugLog("Initialized");
}
示例4: EnemyLander
public EnemyLander(Mover mover, AllNavigationSettings navSet, PseudoBlock landingGear)
{
this.m_logger = new Logger(GetType().Name);
this.m_navSet = navSet;
if (landingGear == null)
{
m_logger.debugLog("landingGear param is null, not going to land");
return;
}
this.m_hasLandingGear = landingGear.Block is IMyLandingGear;
if (!this.m_hasLandingGear)
{
m_logger.debugLog("landingGear param is not landing geat: " + landingGear.Block.getBestName() + ", not going to land");
return;
}
this.m_flyToGrid = new FlyToGrid(mover, navSet, finder: m_navSet.Settings_Current.EnemyFinder, landingBlock: landingGear);
}
示例5: Autopilot_CustomInfo
public Autopilot_CustomInfo(IMyCubeBlock block)
{
this.m_logger = new Logger("Autopilot_CustomInfo", block);
this.m_block = block as IMyTerminalBlock;
m_block.AppendingCustomInfo += AppendingCustomInfo;
Registrar.Add(block, this);
m_logger.debugLog("Initialized", "Autopilot_CustomInfo()", Logger.severity.INFO);
}
示例6: EnemyFinder
public EnemyFinder(Mover mover, AllNavigationSettings navSet, long entityId)
: base(navSet, mover.Block)
{
this.m_logger = new Logger(GetType().Name, mover.Block.CubeBlock, () => CurrentResponse.Response.ToString());
this.m_mover = mover;
this.m_navSet = navSet;
this.m_targetEntityId = entityId;
this.m_landingGear = m_navSet.Settings_Current.LandingBlock;
m_logger.debugLog("Initialized");
}
示例7: AutopilotTerminal
public AutopilotTerminal(IMyCubeBlock block)
{
this.m_logger = new Logger("AutopilotTerminal", block);
this.m_block = block as IMyTerminalBlock;
byte index = 0;
this.m_autopilotControl = new EntityValue<bool>(block, index++, Static.autopilotControl.UpdateVisual, Saver.Instance.LoadOldVersion(69) && ((MyShipController)block).ControlThrusters);
this.m_autopilotCommands = new EntityStringBuilder(block, index++, Static.autopilotCommands.UpdateVisual);
m_block.AppendingCustomInfo += AppendingCustomInfo;
Registrar.Add(block, this);
m_logger.debugLog("Initialized", Logger.severity.INFO);
}