示例#1
0
    public void OnPointerEnter(PointerEventData eventData)
    {
        // Depending on the action we may want to highlight the city or not
        PlayerAction action = GameRenderer.GetAction();

        if (action == PlayerAction.SettleNewCity) // Highlight only empty areas that are close to a city of ours
        // FIXME
        {
        }
        else if (action == PlayerAction.Denuclearize) // Highlight only if city not empty and readioactive and ours, or any empty radioactive spot
        // FIXME
        {
        }
        else if (action == PlayerAction.BuildCityImprovements) // Highlight only if the city is ours and the improvement (if selected) is not yet in the city. On click select the city for the improvement
        {
            if ((vals.status != CityStatus.Owned && vals.status != CityStatus.Radioactive) || vals.owner != GD.localPlayerIndex)
            {
                return;
            }
            areWeOver = true;
            SetSprite();
        }
        else // Action not selected: highlight, on click base details. More info only if we have intelligence
        {
            areWeOver = true;
            SetSprite();
        }
    }