public void Start() { if (m_hudNotification != null) { if (m_hudNotification.IsDisappeared()) { m_hudNotification.Appear(); } MyHudNotification.AddNotification(m_hudNotification); } }
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 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); }
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); } }