本文整理汇总了C#中MinerWars.AppCode.Game.Entities.EntityDetector.MyEntityDetector类的典型用法代码示例。如果您正苦于以下问题:C# MyEntityDetector类的具体用法?C# MyEntityDetector怎么用?C# MyEntityDetector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MyEntityDetector类属于MinerWars.AppCode.Game.Entities.EntityDetector命名空间,在下文中一共展示了MyEntityDetector类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: UnregisterSlowDetectorForUpdate
public static void UnregisterSlowDetectorForUpdate(MyEntityDetector detector)
{
m_slowDetectors.Remove(detector);
m_currentDetectorIndex = 0;
UpdateEntitiesPerFrame();
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:7,代码来源:MyEntityDetectorsManager.cs
示例2: RegisterSlowDetectorForUpdate
public static void RegisterSlowDetectorForUpdate(MyEntityDetector detector)
{
m_slowDetectors.Add(detector);
detector.UpdateCounter = GlobalSlowDetectorCounter++;
UpdateEntitiesPerFrame();
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:7,代码来源:MyEntityDetectorsManager.cs
示例3: 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();
}
}
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:31,代码来源:MyMinesField.cs
示例4: CanBeSlowDetectorUpdated
public static bool CanBeSlowDetectorUpdated(MyEntityDetector detector)
{
Debug.Assert(m_slowDetectors.Count > m_currentDetectorIndex);
int index = detector.UpdateCounter % m_slowDetectors.Count;
if (index >= m_currentDetectorIndex && index < m_currentDetectorIndex + m_entitiesPerFrameToUpdate)
return true;
return false;
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:9,代码来源:MyEntityDetectorsManager.cs
示例5: DetectorOnOnEntityEnter
private void DetectorOnOnEntityEnter(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
var isEnteredWithDrone = MyGuiScreenGamePlay.Static.IsControlledDrone &&
entity == MyGuiScreenGamePlay.Static.ControlledDrone;
if(MyScriptWrapper.IsPlayerShip(entity) || isEnteredWithDrone)
{
m_detector.Off();
MyScriptWrapper.PlayDialogue(m_dialogueId);
if (OnDialogStarted != null) OnDialogStarted();
}
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:12,代码来源:MyDetectorDialogue.cs
示例6: OnDetector
void OnDetector(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (entity != null && entity == MinerWars.AppCode.Game.Managers.Session.MySession.PlayerShip)
{
MyScriptWrapper.OnSpawnpointBotSpawned += OnSpawnpointBotSpawned;
MyScriptWrapper.EntityDeath += EntityDeath;
SpawnNewWave(0);
m_detector.OnEntityEnter -= OnDetector;
}
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:12,代码来源:MySpawnpointWaves.cs
示例7: DialogueBase
private void DialogueBase(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (entity == MySession.PlayerShip)
{
MyScriptWrapper.PlayDialogue(Audio.Dialogues.MyDialogueEnum.RIFT_0200_STATION);
MissionTimer.RegisterTimerAction(24000, DialogueBaseCont, false);
sender.Off();
}
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:9,代码来源:MyRiftMission.cs
示例8: RiftLeft
private void RiftLeft(MyEntityDetector sender, MyEntity entity)
{
if (entity == MySession.PlayerShip)
{
// stop shakes
m_riftShake = false;
MyScriptWrapper.PlayDialogue(Audio.Dialogues.MyDialogueEnum.RIFT_1100_LEAVING);
}
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:10,代码来源:MyRiftMission.cs
示例9: RiftReached
private void RiftReached(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (entity == MySession.PlayerShip)
{
//MyAudio.ApplyTransition(MyMusicTransitionEnum.Mystery);
// start shakes
m_riftShake = true;
MissionTimer.RegisterTimerAction(MyMwcUtils.GetRandomInt(4000, 12000), m_farExplosionAction, false);
}
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:11,代码来源:MyRiftMission.cs
示例10: DummyNearVolodia_Enter
void DummyNearVolodia_Enter(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (MyScriptWrapper.IsPlayerShip(entity))
{
MyScriptWrapper.PlayDialogue(MyDialogueEnum.RUSSIAN_TRANSMITTER_0700_STRANGERPROPOSAL);
sender.Off();
}
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:8,代码来源:MyRussianTransmitterMission.cs
示例11: Detector3Action
public void Detector3Action(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (MySession.IsPlayerShip(entity))
{
MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.Spawn3);
m_Detector3.Off();
}
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:8,代码来源:MyArabianBorderMission.cs
示例12: 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();
}
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:9,代码来源:MyAlienGateMission.cs
示例13: EscapeEvent
private void EscapeEvent(MyEntityDetector sender, MyEntity entity, int meetcriterias)
{
if (MyMissions.ActiveMission != null && MyMissions.ActiveMission.ActiveObjectives != null && MyMissions.ActiveMission.ActiveObjectives.Contains(m_escape))
{
MyScriptWrapper.AddExplosions(new List<uint>() { (uint)EntityID.EscapeEventDummyToActive1, (uint)EntityID.EscapeEventDummyToActive2 }, Explosions.MyExplosionTypeEnum.LARGE_SHIP_EXPLOSION, 100);
MyScriptWrapper.SetEntityEnabled(MyScriptWrapper.GetEntity((uint)EntityID.ParticleDummy1), false);
MyScriptWrapper.SetEntityEnabled(MyScriptWrapper.GetEntity((uint)EntityID.ParticleDummy2), false);
ShowContainer(EntityID.InvisibleContainer3);
MyScriptWrapper.AddVoxelHand((uint)EntityID.VoxelMap, 2203550, 100, MyMwcVoxelMaterialsEnum.Stone_03, MyMwcVoxelHandModeTypeEnum.SUBTRACT);
MyScriptWrapper.AddVoxelHand((uint)EntityID.VoxelMap, 2203550, 61, MyMwcVoxelMaterialsEnum.Stone_03, MyMwcVoxelHandModeTypeEnum.SUBTRACT);
MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.SpawnPointEscape);
this.Components.Add(new MyHeadshake(MissionTimer.ElapsedTime, MyHeadshake.DefaultShaking, 12, 5, 10));
}
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:17,代码来源:MyBarthsMoonTransmitterMission.cs
示例14: MyRussianTransmitterMission_OnEntityEnter
void MyRussianTransmitterMission_OnEntityEnter(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (MyScriptWrapper.IsPlayerShip(entity))
{
MyScriptWrapper.PlayDialogue(MyDialogueEnum.RUSSIAN_TRANSMITTER_0200_BACKDOOR);
sender.Off();
}
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:8,代码来源:MyRussianTransmitterMission.cs
示例15: 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();
}
}
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:16,代码来源:MyRussianTransmitterMission.cs
示例16: 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();
}
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:9,代码来源:MyRiftMission.cs
示例17: Erupt
private void Erupt(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (entity == MySession.PlayerShip)
{
MyScriptWrapper.AddExplosion(sender, MyExplosionTypeEnum.BOMB_EXPLOSION, MyMwcUtils.GetRandomFloat(40f, 60f), MyMwcUtils.GetRandomFloat(25f, 40f), true);
MyScriptWrapper.IncreaseHeadShake(MyMwcUtils.GetRandomFloat(5f, 15f));
sender.Off();
}
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:9,代码来源:MyRiftMission.cs
示例18: M01DetectorOnOnEntityEnter
private void M01DetectorOnOnEntityEnter(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
//if(entity==MySession.PlayerShip)
// MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.FollowCoordinatesSpawnPoint);
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:5,代码来源:MyAlienGateMission.cs
示例19: M11BDetectorOnOnEntityEnter
private void M11BDetectorOnOnEntityEnter(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
MyScriptWrapper.SetEntitiesEnabled(m_boardSecondShipbparticlesDisable, false);
MyScriptWrapper.SetEntitiesEnabled(m_boardSecondShipbparticlesEnable, true);
MyScriptWrapper.ActivateSpawnPoint((uint)EntityID.BoardSecondShipbSpawn0);
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:6,代码来源:MyAlienGateMission.cs
示例20: DummyNearCargo_Enter
void DummyNearCargo_Enter(MyEntityDetector sender, MyEntity entity, int meetCriterias)
{
if (MyScriptWrapper.IsPlayerShip(entity))
{
MyScriptWrapper.PlayDialogue(MyDialogueEnum.RUSSIAN_TRANSMITTER_0800_NEARCARGO);
sender.Off();
}
}
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:8,代码来源:MyRussianTransmitterMission.cs
注:本文中的MinerWars.AppCode.Game.Entities.EntityDetector.MyEntityDetector类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论