Ejemplo n.º 1
0
 /// <summary>
 ///     Ghost platoons have paler icons which hint that they're not real,
 ///     and are always visible to their owner.
 /// </summary>
 public void InitializeAsGhost(Unit unit, TeamColorScheme colorScheme)
 {
     _unitName.text     = unit.Name;
     _color             = colorScheme;
     _unitTypeIcon.text = unit.Config.LabelIcon;
     SetColor(_color.GhostColor);
 }
Ejemplo n.º 2
0
        /// <summary>
        ///     Platoon labels for real units are initialized
        ///     before the platoon is fully spawned and activated,
        ///     so they have to be made visible in a separate, later call.
        /// </summary>
        public void InitializeAsReal(
            Unit unit,
            TeamColorScheme colorScheme,
            PlatoonBehaviour platoon)
        {
            _unitName.text = unit.Name;
            _color         = colorScheme;
            SetColor(colorScheme.BaseColor);

            // When the label is clicked, notify the selection manager:
            _button.onClick.AddListener(
                () => MatchSession.Current.PlatoonLabelClicked(platoon));
        }
Ejemplo n.º 3
0
 /// <summary>
 ///     Ghost platoons have paler icons which hint that they're not real,
 ///     and are always visible to their owner.
 /// </summary>
 public void InitializeAsGhost(Unit unit, TeamColorScheme colorScheme)
 {
     _unitName.text = unit.Name;
     _color         = colorScheme;
     SetColor(_color.GhostColor);
 }