예제 #1
0
 public void setData(StealIslandData islandData)
 {
     island.UpdateCityData(islandData.islandId, islandData.buildings);
     head.gameObject.SetActive(false);
     labelMoney.gameObject.SetActive(false);
     richIcon.SetActive(false);
 }
예제 #2
0
    protected override void StartShowWindow(object[] data)
    {
        StealIslandData[] stealTargets = data[0] as StealIslandData[];

        topBar.gameObject.SetActive(false);
        topBar.anchoredPosition = new Vector2(0, 150);

        //bottomBar.gameObject.SetActive(false);
        //bottomBar.anchoredPosition = new Vector2(0, -350);

        victoryTip.gameObject.SetActive(false);
        effect.gameObject.SetActive(false);
        stealTips.gameObject.SetActive(false);
        goldEffect.SetActive(false);

        islandRoot.localScale = new Vector3(0.3f, 0.3f, 0.3f);
        islandRoot.gameObject.SetActive(false);
        islandRoot.anchoredPosition = new Vector2(500, 0);

        TargetData target = GameMainManager.instance.model.userData.stealTarget;

        targetHead.setData(target.name, target.headImg, target.crowns, target.isVip);
        targetMooneyLabel.text = GameUtils.GetCurrencyString(target.money);

        for (int i = 0; i < stealTargets.Length; i++)
        {
            StealIslandData stealData = stealTargets[i];
            if (i < islands.Length)
            {
                islands[i].setData(stealData);
                islands[i].island.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f);
                (islands[i].transform as RectTransform).anchoredPosition = islandPos[i];
            }

            if (i < buttons.Length)
            {
                buttons[i].gameObject.SetActive(false);
            }
        }
    }