/**
     * <summary>
     * Select a given resource
     * </summary>
     *
     * <param name="resource">resource</param>
     *
     * <returns>
     * void
     * </returns>
     */
    public static void SelectResource(GameObject resource)
    {
        ResourcesManagerBehaviour.UnselectResource();

        // Unselect units
        if (UnitsManagerBehaviour.SelectedUnits != null)
        {
            UnitsManagerBehaviour.UnselectGameObjects();
        }

        ResourceBehaviour resourceBehaviour = resource.GetComponent <ResourceBehaviour>();

        //resourceBehaviour.SetSelect(true);

        // Show info component panel
        Self.infoComponentPanel.SetActive(true);

        Self.infoComponentPanel
        .transform
        .Find("Single")
        .gameObject
        .SetActive(true);

        ResourceUI resourceUI = resourceBehaviour.GetUI()
                                .GetComponent <ResourceUI>();

        InfoComponentPanelUI infoComponentPanelUI = Self.infoComponentPanel.GetComponent <InfoComponentPanelUI>();

        infoComponentPanelUI.SetName(resource.name);
        infoComponentPanelUI.SetHealth(resourceBehaviour.GetHealth(), resourceBehaviour.GetMaxHealth());
        infoComponentPanelUI.SetIcon(resourceUI.GetIcon());

        // Set selected resource
        ResourcesManagerBehaviour.SelectedResource = resource;
    }
    /**
     * <summary>
     * Refresh or update the selected resource information
     * </summary>
     *
     * <returns>
     * void
     * </returns>
     */
    public static void UpdateSelectedResourceInfo()
    {
        if (!ResourcesManagerBehaviour.SelectedResource)
        {
            return;
        }

        ResourceBehaviour resourceBehaviour = ResourcesManagerBehaviour.SelectedResource
                                              .GetComponent <ResourceBehaviour>();
        ResourceUI resourceUI = resourceBehaviour.GetUI()
                                .GetComponent <ResourceUI>();

        InfoComponentPanelUI infoComponentPanelUI = Self.infoComponentPanel.GetComponent <InfoComponentPanelUI>();

        infoComponentPanelUI.SetName(ResourcesManagerBehaviour.SelectedResource.name);
        infoComponentPanelUI.SetHealth(resourceBehaviour.GetHealth(), resourceBehaviour.GetMaxHealth());
        infoComponentPanelUI.SetIcon(resourceUI.GetIcon());
    }