public NamePlateController SpawnNamePlate(INamePlateUnit namePlateUnit, bool usePositionOffset)
        {
            //Debug.Log("NamePlateManager.SpawnNamePlate(" + namePlateUnit.MyDisplayName + ")");
            NamePlateController namePlate = Instantiate(namePlatePrefab, namePlateContainer);

            namePlates.Add(namePlateUnit, namePlate);
            namePlate.SetNamePlateUnit(namePlateUnit, usePositionOffset);
            return(namePlate);
        }
        public NamePlateController SpawnNamePlate(INamePlateUnit namePlateUnit)
        {
            //Debug.Log("NamePlateManager.SpawnNamePlate(" + namePlateUnit.MyDisplayName + ")");
            NamePlateController namePlate = Instantiate(namePlatePrefab, namePlateCanvas);

            namePlates.Add(namePlateUnit, namePlate);
            namePlate.SetNamePlateUnit(namePlateUnit);
            return(namePlate);
        }
 public void SetFocus(INamePlateUnit namePlateUnit)
 {
     ClearFocus();
     //Debug.Log("NamePlateManager.SetFocus(" + characterUnit.MyCharacter.MyCharacterName + ")");
     if (namePlates.ContainsKey(namePlateUnit))
     {
         focus = namePlateUnit;
         // enemy could be dead so we need to check if they exist in the nameplates dictionary
         namePlates[namePlateUnit].Highlight();
     }
 }
 public void RemoveNamePlate(INamePlateUnit namePlateUnit)
 {
     //Debug.Log("NamePlatemanager.RemoveNamePlate(" + namePlateUnit.MyDisplayName + ")");
     if (namePlates.ContainsKey(namePlateUnit))
     {
         if (namePlates[namePlateUnit] != null && namePlates[namePlateUnit].gameObject != null)
         {
             Destroy(namePlates[namePlateUnit].gameObject);
         }
         namePlates.Remove(namePlateUnit);
     }
 }
 public NamePlateController AddNamePlate(INamePlateUnit namePlateUnit, bool usePositionOffset)
 {
     //Debug.Log("NamePlateManager.AddNamePlate(" + namePlateUnit.MyDisplayName + ")");
     if (namePlates.ContainsKey(namePlateUnit) == false)
     {
         NamePlateController namePlate = SpawnNamePlate(namePlateUnit, usePositionOffset);
         namePlateUnit.NamePlateNeedsRemoval += RemoveNamePlate;
         return(namePlate);
     }
     //Debug.Log("NamePlateManager.AddNamePlate(" + namePlateUnit.MyDisplayName + "): key already existed.  returning null!!!");
     return(null);
 }
 public void ClearFocus()
 {
     //Debug.Log("NamePlateManager.ClearFocus()");
     if (focus != null)
     {
         if (namePlates.ContainsKey(focus))
         {
             // enemy could be dead so we need to check if they exist in the nameplates dictionary
             namePlates[focus].UnHighlight();
         }
     }
     focus = null;
 }