private void RemoveDroneNotification() { if (m_learnToUseDrone != null) { m_learnToUseDrone.Disappear(); } }
public void SkipTimer() { MissionTimer.SetElapsedTime(SubmissionDuration); //SubmissionDuration = MissionTimer.GetElapsedTime(); m_countdownNotification.Disappear(); SendTimer(true, false); }
public void Launch() { Debug.Assert(!Launched); Launched = true; Action(); if (m_hudNotification != null) { m_hudNotification.Disappear(); } }
public override void Unload() { base.Unload(); if (m_notification != null) { m_notification.Disappear(); m_notification = null; } MyScriptWrapper.OnUseKeyPress -= OnUseKeyPress; }
void AddPanelPercentNotification() { if (m_hudSolarPanelsCounter != null) { m_hudSolarPanelsCounter.Disappear(); } m_hudSolarPanelsCounter = MyScriptWrapper.CreateNotification( MyTextsWrapperEnum.SolarPanelsLeft, MyHudConstants.MISSION_FONT, 0, new object[] { (int)((1 - (float)m_panelsLeft / m_totalPanelCount) * 100) }); MyScriptWrapper.AddNotification(m_hudSolarPanelsCounter); }
public static void UpdateMaxVolume(bool forward) { float increment = forward ? 10f : -10f; m_maxVolume = MathHelper.Clamp(m_maxVolume + increment, 0f, 100f); if (m_nearestInfluenceSphere != null) { m_nearestInfluenceSphere.ChangeSound(m_nearestInfluenceSphereStrength); } if (m_notification != null) { m_notification.Disappear(); m_notification = null; } }
public override void Update() { if (m_dummy == null) { return; } base.Update(); if (m_invalid) { return; } if ((MySession.PlayerShip.GetPosition() - m_target.GetPosition()).Length() < FailDistanceTooShort) { MyScriptWrapper.PlayDialogue(ShortDialog); m_target.SpeedModifier = 2.00f; m_dummy = null; } if ((MySession.PlayerShip.GetPosition() - m_target.GetPosition()).Length() < FailDistanceTooShort + WarningDelta) { MyScriptWrapper.AddNotification(m_notificationWarningSlowDown); m_notificationWarningSlowDown.Appear(); } else { m_notificationWarningSlowDown.Disappear(); } if ((MySession.PlayerShip.GetPosition() - m_target.GetPosition()).Length() > FailDistanceTooFar) { MyScriptWrapper.PlayDialogue(FarDialog); m_dummy = null; } if ((MySession.PlayerShip.GetPosition() - m_target.GetPosition()).Length() > FailDistanceTooFar - WarningDelta) { m_notificationWarningHurry.Appear(); MyScriptWrapper.AddNotification(m_notificationWarningHurry); } else { m_notificationWarningHurry.Disappear(); } }
public override void Load() { base.Load(); m_dummy = MyScriptWrapper.GetEntity(m_dummyId); MyScriptWrapper.OnDialogueFinished += MyScriptWrapperOnDialogueFinished; m_notificationWarningHurry = MyScriptWrapper.CreateNotification(MyTextsWrapperEnum.HurryUp, MyGuiManager.GetFontMinerWarsRed()); m_notificationWarningSlowDown = MyScriptWrapper.CreateNotification(MyTextsWrapperEnum.SlowDown, MyGuiManager.GetFontMinerWarsRed()); MyScriptWrapper.AddNotification(m_notificationWarningHurry); m_notificationWarningHurry.Disappear(); MyScriptWrapper.AddNotification(m_notificationWarningSlowDown); m_notificationWarningSlowDown.Disappear(); m_invalid = false; //We prevent mission fail by this when skipping with ctrl+del if ((MySession.PlayerShip.GetPosition() - m_target.GetPosition()).Length() < FailDistanceTooShort) { m_invalid = true; } //We prevent mission fail by this when skipping with ctrl+del if ((MySession.PlayerShip.GetPosition() - m_target.GetPosition()).Length() > FailDistanceTooFar) { m_invalid = true; } }
public override bool IsSuccess() { m_isNearLocation = base.IsSuccess() || IsNearRealLocation(); if (m_isNearLocation) { m_notification.SetTextFormatArguments(new object[] { MyGuiManager.GetInput().GetGameControlTextEnum(MyGameControlEnums.USE) }); m_notification.Appear(); MyHudNotification.AddNotification(m_notification); } else { m_notification.Disappear(); } return(false); }
void ClearCountdownNotification() { if (m_countdownNotification != null) { m_countdownNotification.Disappear(); m_countdownNotification = null; } }
public override void Update() { base.Update(); m_remainingTime = m_remainingTime - new TimeSpan(0, 0, 0, 0, MyConstants.PHYSICS_STEP_SIZE_IN_MILLISECONDS); if (m_remainingTime.TotalMilliseconds < 0 || m_detectorReached) { m_countdownNotification.Disappear(); } m_countdownNotification.SetTextFormatArguments(new object[] { String.Format("{0:00}", m_remainingTime.Minutes) + ":" + String.Format("{0:00}", m_remainingTime.Seconds) }); //if not speaking if (m_remainingTime.TotalSeconds <= 0 && !m_detectorReached) { Fail(MyTextsWrapperEnum.Fail_TimeIsUp); } }
public override void Update() { base.Update(); if ((MySession.PlayerShip.GetPosition() - m_target.GetPosition()).Length() < WarningDistance) { m_notification.Appear(); MyScriptWrapper.AddNotification(m_notification); } else { m_notification.Disappear(); } if ((MySession.PlayerShip.GetPosition() - m_target.GetPosition()).Length() < FailDistance) { Fail(MyTextsWrapperEnum.Fail_LostTarget); } }
public override bool IsSuccess() { bool success = base.IsSuccess(); if (success && m_countdownNotification != null) { m_countdownNotification.Disappear(); } return(success); }
public void Start() { MyGuiManager.AddScreen(this); if (Background && BackgroundNotification.HasValue) { var notification = new MyHudNotification.MyNotification(BackgroundNotification.Value); MyHudNotification.AddNotification(notification); this.Closed += (screen) => notification.Disappear(); } }
public override void Load() { base.Load(); MyScriptWrapper.OnDialogueFinished += MyScriptWrapperOnOnDialogueFinished; m_notification = MyScriptWrapper.CreateNotification(MyTextsWrapperEnum.DoNotGoThere, MyGuiManager.GetFontMinerWarsRed()); m_target = MyScriptWrapper.GetEntity(m_targetId); MyScriptWrapper.MarkEntity(m_target, NameTemp.ToString(), MyHudIndicatorFlagsEnum.SHOW_MISSION_MARKER | MyHudIndicatorFlagsEnum.SHOW_BORDER_INDICATORS | MyHudIndicatorFlagsEnum.SHOW_DISTANCE | MyHudIndicatorFlagsEnum.SHOW_TEXT, MyGuitargetMode.Objective); MyScriptWrapper.AddNotification(m_notification); m_notification.Disappear(); }