Пример #1
0
    /// <summary>
    /// Display a tooltip with the appropiate content.
    /// </summary>

    protected virtual void OnTooltip(bool show)
    {
        if (!string.IsNullOrEmpty(item.content))
        {
            if (show)
            {
                UICustomTooltip.Show(item.content);
            }
            else
            {
                UICustomTooltip.Hide();
            }
        }
    }
Пример #2
0
        private void InitializeMap(int cityMap)
        {
            CityRenderer = new Terrain(GameFacade.GraphicsDevice); //The Terrain class implements the ThreeDAbstract interface so that it can be treated as a scene but manage its own drawing and updates.
            CityRenderer.m_GraphicsDevice = GameFacade.GraphicsDevice;
            CityRenderer.Initialize(cityMap);
            CityRenderer.LoadContent(GameFacade.GraphicsDevice);
            CityRenderer.RegenData = true;
            CityRenderer.SetTimeOfDay(0.5);
            GameFacade.Scenes.Add(CityRenderer);

            CityTooltip = new UICustomTooltip();
            Add(CityTooltip);
            CityTooltipHitArea = new UICustomTooltipContainer(CityTooltip);
            CityTooltipHitArea.SetSize(ScreenWidth, ScreenHeight);
            AddAt(0, CityTooltipHitArea);
        }
Пример #3
0
 void OnDestroy()
 {
     mInstance = null;
 }
Пример #4
0
 void Awake()
 {
     mInstance = this;
 }