本文整理匯總了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)]);
}
}
}