本文整理汇总了C#中IMyCubeGrid.getBestName方法的典型用法代码示例。如果您正苦于以下问题:C# IMyCubeGrid.getBestName方法的具体用法?C# IMyCubeGrid.getBestName怎么用?C# IMyCubeGrid.getBestName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMyCubeGrid
的用法示例。
在下文中一共展示了IMyCubeGrid.getBestName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: set_enemy
private bool set_enemy(IMyCubeGrid value)
{
if (value == value_enemy)
return true;
if (value_enemy != null)
if (GridsClaimed.Remove(value_enemy.EntityId))
m_logger.debugLog("Removed " + value_enemy.getBestName() + " from GridsClaimed", Logger.severity.TRACE);
else
m_logger.alwaysLog("Failed to remove " + value_enemy.getBestName() + " from GridsClaimed", Logger.severity.WARNING);
if (value != null)
{
if (GridsClaimed.ContainsKey(value.EntityId))
{
m_logger.debugLog("Already claimed: " + value.getBestName(), Logger.severity.INFO);
return false;
}
else
GridsClaimed.Add(value.EntityId, m_controlBlock.CubeGrid);
m_enemyCells = GridCellCache.GetCellCache(value as IMyCubeGrid);
}
m_stage = Stage.None;
value_enemy = value;
return true;
}
示例2: set_enemy
private bool set_enemy(IMyCubeGrid value)
{
if (value == value_enemy)
return true;
if (value_enemy != null)
if (GridsBeingGround.Remove(value_enemy.EntityId))
m_logger.debugLog("Removed " + value_enemy.getBestName() + " from GridsBeingGround", "Move()", Logger.severity.TRACE);
else
m_logger.alwaysLog("Failed to remove " + value_enemy.getBestName() + " from GridsBeingGround", "Move()", Logger.severity.WARNING);
if (value != null)
{
if (!GridsBeingGround.Add(value.EntityId))
{
m_logger.debugLog("Already reserved: " + value.getBestName(), "set_m_enemy()", Logger.severity.INFO);
return false;
}
m_enemyCells = GridCellCache.GetCellCache(value as IMyCubeGrid);
}
m_stage = Stage.None;
value_enemy = value;
return true;
}