Exemple #1
0
 //called when the mouse is over this selection entity's collider
 void OnMouseEnter()
 {
     //if the hover health bar feature is enabled (for faction entities only)
     if (FactionEntity != null && FactionEntity.EntityHealthComp.IsDead() == false &&
         !EventSystem.current.IsPointerOverGameObject() &&
         !gameMgr.PlacementMgr.IsBuilding())                    //as long as the player is not clicking on a UI object and is not placing a building
     {
         CustomEvents.OnFactionEntityMouseEnter(FactionEntity); //trigger custom event
     }
 }