Example #1
0
        private void AddLabelToCurrentCheckPoint()
        {
            string label = (m_currentCheckPointIndex + 1).ToString(CultureInfo.InvariantCulture) + "/" +
                           m_raceLocations.Count.ToString(CultureInfo.InvariantCulture);

            m_raceLocations[m_currentCheckPointIndex].Entity =
                MyScriptWrapper.GetEntity(m_raceLocations[m_currentCheckPointIndex].LocationEntityIdentifier);
            SetLocationVisibility(true, m_raceLocations[m_currentCheckPointIndex].Entity, MyGuitargetMode.Objective);
            MyHudIndicatorFlagsEnum flags = MyHudIndicatorFlagsEnum.SHOW_TEXT |
                                            MyHudIndicatorFlagsEnum.SHOW_BORDER_INDICATORS |
                                            MyHudIndicatorFlagsEnum.SHOW_DISTANCE;

            MyHud.ChangeText(m_raceLocations[m_currentCheckPointIndex].Entity, new StringBuilder(label),
                             MyGuitargetMode.Objective, 0, flags);
        }
Example #2
0
        protected override void SetHudMarker()
        {
            MyHudIndicatorFlagsEnum hudFlags      = MyHudIndicatorFlagsEnum.SHOW_TEXT | MyHudIndicatorFlagsEnum.SHOW_BORDER_INDICATORS | MyHudIndicatorFlagsEnum.SHOW_HEALTH_BARS | MyHudIndicatorFlagsEnum.SHOW_DISTANCE | MyHudIndicatorFlagsEnum.SHOW_MISSION_MARKER;
            MyGuitargetMode?        guiTargetMode = MyGuitargetMode.Neutral;

            if (PrefabHangarType == MyMwcObjectBuilder_PrefabHangar_TypesEnum.HANGAR &&
                MyFactions.GetFactionsRelation(this.m_owner, MySession.PlayerShip) == MyFactionRelationEnum.Friend)
            {
                guiTargetMode = MyGuitargetMode.Friend;
            }
            else
            {
                hudFlags |= MyHudIndicatorFlagsEnum.SHOW_ONLY_IF_DETECTED_BY_RADAR | MyHudIndicatorFlagsEnum.ALPHA_CORRECTION_BY_DISTANCE;
            }


            MyHud.ChangeText(this, new StringBuilder(GetCorrectDisplayName()), guiTargetMode, 0, hudFlags);
        }
Example #3
0
        protected override void SetHudMarker()
        {
            if (IsNotEmpty())
            {
                MyHudMaxDistanceMultiplerTypes?maxDistanceMultiplerType = null;

                if (m_cargoBoxType == 0)
                {
                    m_cargoBoxType = GetTypeFromModelLod0Enum(m_modelLod0.ModelEnum);
                }

                string displayName = GetCorrectDisplayName(ref maxDistanceMultiplerType);

                MyHud.ChangeText(this, new StringBuilder(displayName), MyGuitargetMode.CargoBox, 200f, MyHudIndicatorFlagsEnum.SHOW_BORDER_INDICATORS | MyHudIndicatorFlagsEnum.SHOW_DISTANCE | MyHudIndicatorFlagsEnum.SHOW_TEXT, maxDistanceMultiplerType: maxDistanceMultiplerType);
            }
            else
            {
                MyHud.RemoveText(this);
            }
        }
Example #4
0
        private void UpdateHUD(MySmallShip friend, bool isFriend)
        {
            MyHudEntityParams?gettedHudParams = MyHud.GetHudParams(friend);

            if (gettedHudParams != null)
            {
                MyHudEntityParams hudParams = gettedHudParams.Value;
                if (isFriend)
                {
                    hudParams.FlagsEnum  &= ~MyHudIndicatorFlagsEnum.ALPHA_CORRECTION_BY_DISTANCE;
                    hudParams.FlagsEnum  &= ~MyHudIndicatorFlagsEnum.SHOW_ONLY_IF_DETECTED_BY_RADAR;
                    hudParams.MaxDistance = 0f;
                }
                else
                {
                    hudParams.FlagsEnum  |= MyHudIndicatorFlagsEnum.ALPHA_CORRECTION_BY_DISTANCE;
                    hudParams.FlagsEnum  |= MyHudIndicatorFlagsEnum.SHOW_ONLY_IF_DETECTED_BY_RADAR;
                    hudParams.MaxDistance = 10000f;
                }
                MyHud.ChangeText(friend, hudParams.Text, hudParams.TargetMode, hudParams.MaxDistance, hudParams.FlagsEnum, hudParams.DisplayFactionRelation, maxDistanceMultiplerType: hudParams.MaxDistanceMultiplerType);
            }
        }
 private void AddLockedHud()
 {
     DisplayOnHud = true;
     MyHud.ChangeText(this, MyTextsWrapper.Get(MyTextsWrapperEnum.DoorsLocked), MyGuitargetMode.Enemy, 200f, MyHudIndicatorFlagsEnum.SHOW_BORDER_INDICATORS | MyHudIndicatorFlagsEnum.SHOW_DISTANCE | MyHudIndicatorFlagsEnum.SHOW_TEXT | MyHudIndicatorFlagsEnum.SHOW_HEALTH_BARS | MyHudIndicatorFlagsEnum.SHOW_MISSION_MARKER);
 }
 protected override void SetHudMarker()
 {
     MyHud.ChangeText(this, new StringBuilder(DisplayName), MyGuitargetMode.Neutral, 0, MyHudIndicatorFlagsEnum.SHOW_TEXT | MyHudIndicatorFlagsEnum.SHOW_BORDER_INDICATORS | MyHudIndicatorFlagsEnum.SHOW_HEALTH_BARS | MyHudIndicatorFlagsEnum.SHOW_DISTANCE | MyHudIndicatorFlagsEnum.ALPHA_CORRECTION_BY_DISTANCE | MyHudIndicatorFlagsEnum.SHOW_MISSION_MARKER);
 }
Example #7
0
 protected override void SetHudMarker()
 {
     MyHud.ChangeText(this, new StringBuilder(), null, SearchingDistance, HUD.MyHudIndicatorFlagsEnum.SHOW_BORDER_INDICATORS | HUD.MyHudIndicatorFlagsEnum.SHOW_HEALTH_BARS | HUD.MyHudIndicatorFlagsEnum.SHOW_DISTANCE | HUD.MyHudIndicatorFlagsEnum.ALPHA_CORRECTION_BY_DISTANCE | MyHudIndicatorFlagsEnum.SHOW_FACTION_RELATION_MARKER | MyHudIndicatorFlagsEnum.SHOW_MISSION_MARKER | MyHudIndicatorFlagsEnum.SHOW_ONLY_IF_DETECTED_BY_RADAR, new HUD.MyHudDisplayFactionRelation(false, false, true));
 }