Пример #1
0
        public override string ToString()
        {
            if (Position == null)
            {
                return("Invalid contact " + Id);
            }
            string Info = string.Empty;

            if (IsIdentified)
            {
                Info = "[" + Id + "] " + RefersToUnitName + " (" + RefersToUnitClassId + ")";
            }
            else
            {
                Info = "[" + Id + "] " + DetectionClassification.ToString();
            }
            if (this.FriendOrFoeClassification != GameConstants.FriendOrFoe.Undetermined)
            {
                Info += " [" + this.FriendOrFoeClassification.ToString() + "]";
            }
            else
            {
                Info += " [FoF Undetermined]";
            }

            Info += "  @ " + Position.ToString();
            if (KnownDamagePercent > 0)
            {
                Info += string.Format(" dmg: {0:F}%", KnownDamagePercent);
            }
            return(Info);
        }
Пример #2
0
        public override string ToString()
        {
            if (Position == null || Position.Coordinate == null || RefersToUnit == null)
            {
                return("Invalid contact " + Id);
            }
            string Info = string.Empty;

            if (IsIdentified && RefersToUnit != null)
            {
                Info += " " + RefersToUnit.Name + " (" + RefersToUnit.UnitClass.UnitClassShortName + ")";
            }
            else
            {
                Info += DetectionClassification.ToString() + " " + Id;
            }
            Info += "  [" + this.FriendOrFoeClassification.ToString() + "]";
            return(Info);
        }