Example #1
0
    public override void Show()
    {
        currentSelectionWeaponIndex = 0;
        weaponScroller.Clear();
        weaponScroller.SetImageSpacing(AutoRect.AutoSize(WeaponsLogoTexturePosition.WeaponLogoSpacing));

        for (int i = 0; i < weaponList.Count; i++)
        {
            if (weaponList[i].Exist == WeaponExistState.Owned)
            {
                UIImage        uiImage = new UIImage();
                TexturePosInfo info    = WeaponsLogoTexturePosition.GetWeaponTextureRect(i);
                uiImage.SetTexture(info.m_Material, info.m_TexRect);
                weaponScroller.Add(uiImage);
            }
        }
        weaponScroller.EnableScroll();
        Material shopMaterial = UIResourceMgr.GetInstance().GetMaterial("ShopUI");

        weaponScroller.AddOverlay(shopMaterial, new Rect(720, 610, 160, 75));
        Material avatarLogoMaterial = UIResourceMgr.GetInstance().GetMaterial("Avatar");

        weaponScroller.SetMaskImage(avatarLogoMaterial, AvatarTexturePosition.Mask);

        weaponScroller.Show();

        base.Show();
        avatarFrame.ChangeAvatar(GameApp.GetInstance().GetGameState().Avatar);
        avatarFrame.Show();


        cashPanel.SetCash(gameState.GetCash());
        UpdateWeaponInfo();
        weaponInfoPanel.Show();
    }
Example #2
0
 public override void Show()
 {
     base.Show();
     avatar3DFrame.ChangeAvatar(GameApp.GetInstance().GetGameState().Avatar);
     //avatarPanel.SetText(ConstData.FONT_NAME1, AvatarInfo.AVATAR_NAME[(int)GameApp.GetInstance().GetGameState().Avatar], ColorName.fontColor_darkred);
     cashPanel.SetCash(GameApp.GetInstance().GetGameState().GetCash());
     cashPanel.Show();
     avatar3DFrame.Show();
 }
Example #3
0
 public override void Show()
 {
     cashPanel.SetCostPanelPosition(new Rect(650, 110, 314, 60));
     avatarFrame.ChangeAvatar(GameApp.GetInstance().GetGameState().Avatar);
     avatarScroller.SetSelection(BUTTON_NUM - 1 - (int)GameApp.GetInstance().GetGameState().Avatar);
     currentSelectionIndex = BUTTON_NUM - 1 - (int)GameApp.GetInstance().GetGameState().Avatar;
     buyButton.SetText(" SELECT");
     avatarInfoPanel.SetText(AvatarInfo.AVATAR_INFO[(int)GameApp.GetInstance().GetGameState().Avatar]);
     UpdateCashPanel();
     avatarFrame.Show();
     cashPanel.Show();
     base.Show();
 }