本文整理汇总了C#中MinerWars.AppCode.Game.Entities.EntityDetector.MyEntityDetector.SetSensorDetectRigidBodyTypes方法的典型用法代码示例。如果您正苦于以下问题:C# MyEntityDetector.SetSensorDetectRigidBodyTypes方法的具体用法?C# MyEntityDetector.SetSensorDetectRigidBodyTypes怎么用?C# MyEntityDetector.SetSensorDetectRigidBodyTypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MinerWars.AppCode.Game.Entities.EntityDetector.MyEntityDetector
的用法示例。
在下文中一共展示了MyEntityDetector.SetSensorDetectRigidBodyTypes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateDetectorForParticleEffect
void CreateDetectorForParticleEffect()
{
m_smallShipDetector = new MyEntityDetector();
m_smallShipDetector.Init(
null,
new MyMwcObjectBuilder_EntityDetector(
new Vector3(MyDummyPointConstants.PARTICLE_DETECTOR_SIZE * UserScale, 0, 0),
MyMwcObjectBuilder_EntityDetector_TypesEnum.Sphere),
this,
WorldMatrix,
new List<IMyEntityDetectorCriterium>());
m_smallShipDetector.Save = false;
m_smallShipDetector.SetSensorDetectRigidBodyTypes(MyConstants.RIGIDBODY_TYPE_SHIP);
m_smallShipDetector.On();
}
示例2: Load
public override void Load()
{
if (!IsMainSector) return;
RemoveFriends();
MyScriptWrapper.DisableAllGlobalEvents();
m_attackerBots.Clear();
m_detectorFirst = MyScriptWrapper.GetDetector((uint)EntityID.DetectorFirst);
m_detectorSecond = MyScriptWrapper.GetDetector((uint)EntityID.DetectorSecond);
m_detectorThird = MyScriptWrapper.GetDetector((uint)EntityID.DetectorThird);
m_detectorFirst.SetSensorDetectRigidBodyTypes(null);
m_detectorSecond.SetSensorDetectRigidBodyTypes(null);
m_detectorThird.SetSensorDetectRigidBodyTypes(null);
m_madelyn = MyScriptWrapper.GetEntity("Madelyn");
//Because she was hidden in previous mission
MyScriptWrapper.UnhideEntity(m_madelyn);
m_transporter = MyScriptWrapper.GetEntity((uint)EntityID.Transporter);
m_transporter.OnContactEvent += new Action<MyEntity>(m_transporter_OnContactEvent);
m_reassignBotTargets = false;
m_motherShipSpeed = MOTHERSHIP_FULLSPEED;
MyScriptWrapper.PrepareMotherShipForMove(m_transporter);
MyScriptWrapper.AddNotification(MyScriptWrapper.CreateNotification(Localization.MyTextsWrapperEnum.SwitchInHUBTurrets, MyGuiManager.GetFontMinerWarsGreen(), 60000,
new object[] {
MyGuiManager.GetInput().GetGameControlTextEnum(MyGameControlEnums.ROLL_LEFT),
MyGuiManager.GetInput().GetGameControlTextEnum(MyGameControlEnums.ROLL_RIGHT)
}
));
foreach (var item in m_spawnCompanions)
{
MyScriptWrapper.ActivateSpawnPoint(item);
}
var pos = MySession.PlayerShip.WorldMatrix.Translation;
MySession.PlayerShip.WorldMatrix = m_transporter.WorldMatrix;
Vector3 playerPos = m_transporter.WorldMatrix.Translation - 400 * m_transporter.WorldMatrix.Forward;
MyScriptWrapper.Move(MySession.PlayerShip, playerPos);
//MyScriptWrapper.EnablePhysics(MySession.PlayerShip.EntityId.Value.NumericValue, false);
MyScriptWrapper.HideEntity(MySession.PlayerShip);
m_towers[0] = MyScriptWrapper.GetEntity((uint)EntityID.Tower1);
m_towers[1] = MyScriptWrapper.GetEntity((uint)EntityID.Tower2);
m_towers[2] = MyScriptWrapper.GetEntity((uint)EntityID.Tower3);
MyScriptWrapper.SetEntityPriority(m_towers[0], -1);
MyScriptWrapper.SetEntityPriority(m_towers[1], -1);
MyScriptWrapper.SetEntityPriority(m_towers[2], -1);
MyScriptWrapper.SetEntityPriority(MyScriptWrapper.GetEntity((uint)EntityID.TowerDown), -1);
MyScriptWrapper.TakeControlOfLargeWeapon(m_towers[m_activeTower]);
MyScriptWrapper.ForbideDetaching();
MyScriptWrapper.ApplyTransition(MyMusicTransitionEnum.Mystery);
MyScriptWrapper.SwitchTowerPrevious += MyScriptWrapper_SwitchTowerPrevious;
MyScriptWrapper.SwitchTowerNext += MyScriptWrapper_SwitchTowerNext;
MyScriptWrapper.EntityDeath += MyScriptWrapper_OnEntityDeath;
MyScriptWrapper.OnSpawnpointBotSpawned += BotSpawned;
m_objective01_flyTowardsMadelyn.OnMissionLoaded += O01FlyTowardsMadelynLoaded;
m_objective01_flyTowardsMadelyn.OnMissionSuccess += O01FlyTowardsMadelynSuccess;
m_madelynDestinationReached = false;
m_transporterDestinationReached = false;
m_moveMadelynFlag = false;
m_towersCount = 3;
m_activeTower = 0;
m_switchCounter = 0;
MyScriptWrapper.DrawHealthOfCustomPrefabInLargeWeapon(MyScriptWrapper.GetEntity((uint)EntityID.TransporterShip));
MyScriptWrapper.DisableShipBackCamera();
m_detectorFirst.OnEntityEnter += DetectorActionFirst;
m_detectorFirst.On();
MyScriptWrapper.OnDialogueFinished += MyScriptWrapper_OnDialogueFinished;
base.Load();
}