Ejemplo n.º 1
0
        public MyHudEntityParams(StringBuilder text, MyGuitargetMode? targetMode, float maxDistance, MyHudIndicatorFlagsEnum flagsEnum, MyHudDisplayFactionRelation? displayFactionRelation = null, MyHudMaxDistanceMultiplerTypes? maxDistanceMultiplerType = null)
            : this()
        {
            this.Text = text;
            this.FlagsEnum = flagsEnum;
            this.MaxDistance = maxDistance;
            this.TargetMode = targetMode;
            this.MaxDistanceMultiplerType = maxDistanceMultiplerType;

            if (displayFactionRelation.HasValue)
            {
                DisplayFactionRelation = displayFactionRelation.Value;
            }
            else 
            {
                DisplayFactionRelation = MyHudDisplayFactionRelation.Default;
            }
        }
Ejemplo n.º 2
0
 public static void DebugClearAndAddText(Vector3 point, StringBuilder text, float maxDistance = 0, MyHudIndicatorFlagsEnum flagsEnum = MyHudIndicatorFlagsEnum.SHOW_TEXT | MyHudIndicatorFlagsEnum.SHOW_BORDER_INDICATORS | MyHudIndicatorFlagsEnum.SHOW_DISTANCE | MyHudIndicatorFlagsEnum.SHOW_MISSION_MARKER | MyHudIndicatorFlagsEnum.SHOW_FACTION_RELATION_MARKER, MyHudDisplayFactionRelation? displayFactinRelation = null)
 {
     Debug.Assert(text.Length != 0);
     HudDebugPoints.Clear();
     HudDebugPoints.Add(new Tuple<Vector3, MyHudEntityParams>(point, new MyHudEntityParams(text, MyGuitargetMode.Enemy, maxDistance, flagsEnum, displayFactinRelation)));
 }
Ejemplo n.º 3
0
        public static void ChangeText(MyEntity entity, StringBuilder text, MyGuitargetMode? targetMode, float maxDistance = 0, MyHudIndicatorFlagsEnum flagsEnum = DEFAULT_FLAGS, MyHudDisplayFactionRelation? displayFactinRelation = null, MyHudMaxDistanceMultiplerTypes? maxDistanceMultiplerType = null)
        {
            RemoveText(entity);

            AddText(entity, text, targetMode, maxDistance, flagsEnum, displayFactinRelation, maxDistanceMultiplerType);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Adds the text that is displayed per entity.
 /// </summary>
 /// <param name="entity">The entity.</param>
 /// <param name="text">The text to display</param>
 public static void AddText(MyEntity entity, StringBuilder text, MyGuitargetMode? targetMode = null, float maxDistance = 0, MyHudIndicatorFlagsEnum flagsEnum = MyHudIndicatorFlagsEnum.SHOW_TEXT | MyHudIndicatorFlagsEnum.SHOW_BORDER_INDICATORS | MyHudIndicatorFlagsEnum.SHOW_DISTANCE | MyHudIndicatorFlagsEnum.ALPHA_CORRECTION_BY_DISTANCE | MyHudIndicatorFlagsEnum.SHOW_MISSION_MARKER | MyHudIndicatorFlagsEnum.SHOW_FACTION_RELATION_MARKER, MyHudDisplayFactionRelation? displayFactinRelation = null, MyHudMaxDistanceMultiplerTypes? maxDistanceMultiplerType = null)
 {
     //Why assert?
     //Debug.Assert(text.Length != 0);
     HudEntities.Add(new Tuple<WeakReference, MyHudEntityParams>(new WeakReference(entity), new MyHudEntityParams(text, targetMode, maxDistance, flagsEnum, displayFactinRelation, maxDistanceMultiplerType)));
 }