本文整理汇总了C#中MinerWars.AppCode.Game.Entities.MyEntity.Kill方法的典型用法代码示例。如果您正苦于以下问题:C# MyEntity.Kill方法的具体用法?C# MyEntity.Kill怎么用?C# MyEntity.Kill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MinerWars.AppCode.Game.Entities.MyEntity
的用法示例。
在下文中一共展示了MyEntity.Kill方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BotSpawned
void BotSpawned(MyEntity spawnpoint, MyEntity bot)
{
//List<uint> {
// (uint)EntityID.SpawnLastR,
// (uint)EntityID.SpawnLastL,
// (uint)EntityID.SpawnLastAsteroid,
// (uint)EntityID.SpawnCenterL,
// (uint)EntityID.SpawnCenterR }
var attackerList = new List<uint>
{
(uint)EntityID.SpawnInR,
(uint)EntityID.SpawnInL,
(uint)EntityID.SpawnIn3,
(uint)EntityID.SpawnIn4,
(uint)EntityID.SpawnFrontL,
(uint)EntityID.SpawnFrontR,
(uint)EntityID.SpawnCenterL,
(uint)EntityID.SpawnCenterR,
(uint)EntityID.SpawnLastL,
(uint)EntityID.SpawnLastR,
(uint)EntityID.SpawnLastAsteroid,
(uint)EntityID.SpawnLast1,
(uint)EntityID.SpawnLast1_2,
(uint)EntityID.SpawnLast2,
(uint)EntityID.SpawnLast2_2,
(uint)EntityID.SpawnLast3,
(uint)EntityID.SpawnLast3_2,
(uint)EntityID.SpawnLast4,
};
foreach (var item in attackerList)
{
if (spawnpoint == MyScriptWrapper.GetEntity(item) && bot != null)
{
MyScriptWrapper.SetSleepDistance(bot as MySmallShipBot, 10000);
var botShip = bot as MySmallShipBot;
m_attackerBots.Add(botShip);
//botShip.Attack(MyScriptWrapper.GetEntity((uint)m_transporterAttackPoints[MyMwcUtils.GetRandomInt(m_transporterAttackPoints.Count)]));
}
}
foreach (var item in m_spawnCompanions)
{
if (spawnpoint == MyScriptWrapper.GetEntity(item))
{
MySmallShipBot botship = bot as MySmallShipBot;
//botship.SlowDown = 0.583f;
botship.SpeedModifier = 0.583f * (MOTHERSHIP_SLOWSPEED / MOTHERSHIP_FULLSPEED);
botship.IsDestructible = m_reassignBotTargets;
if (m_reassignBotTargets)
bot.Kill(m_towers[MyMwcUtils.GetRandomInt(m_towers.Length)]);
}
}
}