Esempio n. 1
0
    protected override void StartShowWindow(object[] data)
    {
        artillery.anchoredPosition = new Vector2(0, -250);
        artillery.localRotation    = Quaternion.identity;
        (island.transform as RectTransform).anchoredPosition = new Vector2(600, 0);
        island.transform.localScale = new Vector3(0.3f, 0.3f, 0.3f);
        btnRoot.SetActive(false);
        particSys.gameObject.SetActive(false);
        boomAnimation.gameObject.SetActive(false);
        aimIcon.gameObject.SetActive(false);
        shell.gameObject.SetActive(false);
        shield.gameObject.SetActive(false);

        AttackTargetUserData randomAttackTarget = data[0] as AttackTargetUserData;

        selectAttackTarget = new SelectPlayerData(randomAttackTarget);
        island.UpdateCityData(randomAttackTarget.islandId, randomAttackTarget.buildings);
        SetSelectBtn(randomAttackTarget.buildings);

        GameMainManager.instance.netManager.Vengeance((ret, res) => {
            if (res.isOK)
            {
                topBar.SetEnemysData(res.data.enemies, randomAttackTarget);
                topBar.SetFriendsData(GameMainManager.instance.model.userData.friendInfo);
            }
            else
            {
                topBar.SetEnemysData(null, randomAttackTarget);
            }
        });
    }
Esempio n. 2
0
    public void SetData(int islandID, BuildingData[] data, System.Action <bool> onUpgrading)
    {
        user = GameMainManager.instance.model.userData;
        //this.islandID = islandID;
        islandFactory.UpdateCityData(user.islandId, user.buildings);

        cityName.text = GameMainManager.instance.configManager.islandConfig.GetIslandName(user.islandId);

        this.onUpgrading = onUpgrading;

        UpdateRepairBtns(data);
    }
Esempio n. 3
0
 public void setData(StealIslandData islandData)
 {
     island.UpdateCityData(islandData.islandId, islandData.buildings);
     head.gameObject.SetActive(false);
     labelMoney.gameObject.SetActive(false);
     richIcon.SetActive(false);
 }
Esempio n. 4
0
 protected override void StartShowWindow(object[] data)
 {
     otherData = data[0] as OtherData;
     island.UpdateCityData(otherData.islandId, otherData.buildings);
     head.setData(otherData.name, otherData.headImg, otherData.crowns, otherData.isVip);
 }