/// <summary>
    /// All the components desired to be hidden should be stored in a panel on the next level down in the heirarchy.
    /// "Panel" should be used as the GameObject name so that it can always be found when this function is called.
    /// </summary>
    public virtual void HideComponents()
    {
        GameObject panel = transform.Find("Panel").gameObject;

        panel.SetActive(false);
        MouseSelection.DelayNextClickSelect();
    }
Beispiel #2
0
 public void DestroySelf()
 {
     notificationQueue = FindObjectOfType <NotificationQueue>();
     transform.SetParent(null);//destroy doesn't destroy obj until end of frame, so child count won't be updated unless this is detatched from the parent
     Destroy(gameObject);
     Destroy(this);
     MouseSelection.DelayNextClickSelect();
     notificationQueue.ToggleLbl();
 }
Beispiel #3
0
 void OnMouseUpAsButton()
 {
     ActivateNotification();
     MouseSelection.DelayNextClickSelect();
 }
 /// <summary>
 /// A delay is used so that when the UI is deactivated the click used to deactivate it won't cause side effect behaviour
 /// e.g. player walking to where the button was clicked.
 /// </summary>
 public void DeactivateSelf()
 {
     gameObject.SetActive(false);
     MouseSelection.DelayNextClickSelect();
 }