本文整理汇总了C#中MinerWars.AppCode.Game.Entities.EntityDetector.MyEntityDetector.Off方法的典型用法代码示例。如果您正苦于以下问题:C# MyEntityDetector.Off方法的具体用法?C# MyEntityDetector.Off怎么用?C# MyEntityDetector.Off使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MinerWars.AppCode.Game.Entities.EntityDetector.MyEntityDetector
的用法示例。
在下文中一共展示了MyEntityDetector.Off方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: mineDetector_OnEntityPositionChange
private void mineDetector_OnEntityPositionChange(MyEntityDetector sender, MyEntity entity, Vector3 newposition)
{
if (sender.Closed)
return;
if (entity == MySession.PlayerShip)
{
if (m_beepCue == null || !m_beepCue.Value.IsPlaying)
{
m_beepCue = MyAudio.AddCue2D(MySoundCuesEnum.SfxHudAlarmDamageA);
}
float distance = (entity.GetPosition() - sender.GetPosition()).Length();
if (distance < m_mineStartRadius)
{
uint mineId = 0;
for (int i = 0; i < m_mines.GetLength(0); i++)
{
if (m_mines[i, 1] == sender.Parent.EntityId.Value.NumericValue)
{
mineId = m_mines[i, 0];
}
}
ExplodeMine(mineId);
sender.Off();
sender.Parent.MarkForClose();
}
}
}
示例2: m_botDetector_OnEntityEnter
void m_botDetector_OnEntityEnter(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
MyScriptWrapper.Follow(MySession.PlayerShip, m_botToTalk);
sender.Off();
}
示例3: DialogueMining
private void DialogueMining(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (entity == MySession.PlayerShip)
{
MyScriptWrapper.PlayDialogue(Audio.Dialogues.MyDialogueEnum.RIFT_0600_MINING);
MyScriptWrapper.EntityInventoryItemAmountChanged += OreAmountChanged;
sender.Off();
}
}
示例4: M03DetectorOnOnEntityEnter
private void M03DetectorOnOnEntityEnter(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (entity == MySession.PlayerShip)
{
var madelynLocation = MyScriptWrapper.GetEntity((uint)EntityID.RunForYourLifeMovingMadelyn);
MyScriptWrapper.Move(m_madelyn, madelynLocation.GetPosition(), madelynLocation.GetForward(), madelynLocation.GetUp());
sender.Off();
}
}
示例5: DummyNearFrequencyHub_Enter
void DummyNearFrequencyHub_Enter(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (MyScriptWrapper.IsPlayerShip(entity))
{
if (m_tradeWithVolodia.IsCompleted())
{
MyScriptWrapper.PlayDialogue(MyDialogueEnum.RUSSIAN_TRANSMITTER_1500_IFITDOESNOTWORK);
sender.Off();
}
else
{
MyScriptWrapper.PlayDialogue(MyDialogueEnum.RUSSIAN_TRANSMITTER_0400_HUBFOUND);
sender.Off();
}
}
}
示例6: DummyNearCargo_Enter
void DummyNearCargo_Enter(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (MyScriptWrapper.IsPlayerShip(entity))
{
MyScriptWrapper.PlayDialogue(MyDialogueEnum.RUSSIAN_TRANSMITTER_0800_NEARCARGO);
sender.Off();
}
}
示例7: FindMainRoomEntrance_OnEntityEnter
void FindMainRoomEntrance_OnEntityEnter(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
MyScriptWrapper.PlayDialogue(MyDialogueEnum.RUSSIAN_TRANSMITTER_1900_PLACEDEVICE);
var detectorOutside = MyScriptWrapper.GetDetector((uint)EntityID.DummyOutsideTransmitter);
detectorOutside.Off();
sender.Off();
}
示例8: StartDetector12
private void StartDetector12(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (entity == MySession.PlayerShip)
{
MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnpointOnRoadToOldEntr2);
sender.Off();
}
}
示例9: PlayerInPipes
private void PlayerInPipes(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (MySession.IsPlayerShip(entity))
{
MyScriptWrapper.DestroyEntities(new List<uint> { (uint)EntityID.GrilleToDestroy });
MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Spawnpoint_ToLeftHub);
MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Spawnpoint_ToRightHub);
SetHoundDetectorsBase();
var rightEnteredDetector = MyScriptWrapper.GetDetector((uint)EntityID.Detector_RightEntered);
rightEnteredDetector.Off();
var leftEnteredDetector = MyScriptWrapper.GetDetector((uint)EntityID.Detector_LeftEntered);
leftEnteredDetector.Off();
MyScriptWrapper.SetWaypointListSecrecy(new List<uint> { (uint)EntityID.Waypoint_ToAmbush }, true);
sender.Off();
}
}
示例10: BridgeDetectorAction
public void BridgeDetectorAction(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (MyScriptWrapper.IsPlayerShip(entity))
{
MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.BridgeSpawnpoint);
sender.Off();
}
}
示例11: Detector2_Enter
public void Detector2_Enter(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (MyScriptWrapper.IsPlayerShip(entity))
{
MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.spawn2);
sender.Off();
}
}
示例12: DetectorNearHub3_Enter
void DetectorNearHub3_Enter(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (MyScriptWrapper.IsPlayerShip(entity))
{
MyScriptWrapper.PlayDialogue(MyDialogueEnum.RESEARCH_VESSEL_1200_THIRDHUB);
sender.Off();
}
}
示例13: SecurityDetectorReached
void SecurityDetectorReached(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (entity == m_hacker)
{
m_hackerSubmission.Suspend(true);
sender.Off();
}
}
示例14: Box1Entered
private void Box1Entered(MyEntityDetector sender, MyEntity entity, int meetcriterias)
{
sender.Off();
if (m_findArtifact.IsAvailable()) m_findArtifact.MissionEntityIDs.Remove((uint)EntityID.Box1Marker);
MyScriptWrapper.RemoveEntityMark(MyScriptWrapper.GetEntity((uint)EntityID.Box1Marker));
}
示例15: StartDetector08
private void StartDetector08(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (entity == MySession.PlayerShip)
{
//MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SomeSpawnpoint07);
//MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SomeSpawnpoint10);
//MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SomeSpawnpoint09);
//MyScriptWrapper.ActivateSpawnPoint(164174);
MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnpointSeekAndDestroyA);
MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnpointSeekAndDestroyB);
sender.Off();
}
}