Exemple #1
0
 //-------------------------------------------------------------------------------------------------
 // unity methods
 //-------------------------------------------------------------------------------------------------
 public void Awake()
 {
     //get the icon image
     mImage    = GetComponentInChildren <Image>();
     mActive   = false;
     mIconType = GameTypes.IconType.Unknown;
 }
Exemple #2
0
    private void makeIcon(Entity ent, GameTypes.IconType itype)
    {
        IconPanel ip = Instantiate(ObjectManager.getMenu("IconPanel"), mCameraSpaceCanvas.transform).GetComponent <IconPanel>();

        ip.mEntity   = ent;
        ip.mIconType = itype;
        ip.mActive   = true;
        //add it to the list to keep track
        mIcons.Add(ip);
    }
Exemple #3
0
 public void makeIconIfNeeded(Entity ent)
 {
     //make an icon of the given type for the given entity if its necessary
     if (ent.hasIcon() == true)
     {
         return;
     }
     GameTypes.IconType itype = needsIcon(ent);
     if (itype != GameTypes.IconType.Unknown)
     {
         makeIcon(ent, itype);
     }
 }