lcy
19 小时以前 da8ba158da20c9251025753e4b0bf172a52c5ade
638 VIP专属客服
2个文件已修改
5个文件已添加
127 ■■■■■ 已修改文件
Main/Main.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Main/RightFuncInHome.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/SuperVIP.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/SuperVIP/SuperVIPWin.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/SuperVIP/SuperVIPWin.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/SuperVIP/SuperVipManager.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/SuperVIP/SuperVipManager.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Main.cs
@@ -122,6 +122,8 @@
        managers.Add(FestivalActivityRechargeTotDayManager.Instance);
        managers.Add(FestivalActivityCheckInManager.Instance);
        managers.Add(FestivalActivityMissionManager.Instance);
        managers.Add(SuperVipManager.Instance);
        foreach (var manager in managers)
        {
Main/System/Main/RightFuncInHome.cs
@@ -19,6 +19,7 @@
    [SerializeField] Button signBtn;
    [SerializeField] Button previewBtn;
    [SerializeField] Button reviewBtn; //好评
    [SerializeField] Button superVIPBtn;
    static string listenWindowName = "";   //监听关闭时再显示
@@ -93,8 +94,12 @@
        {
            UIManager.Instance.OpenWindow<GoodReviewWin>();
        });
        superVIPBtn.AddListener(() =>
        {
            UIManager.Instance.OpenWindow<SuperVIPWin>();
        });
    }
    void OnDestroy()
    {
        UIManager.Instance.OnCloseWindow -= OnCloseWindow;
@@ -111,8 +116,14 @@
        monthCardBtn.SetActive(FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.PrivilegeCard));
        previewBtn.SetActive(FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.FunctionPreview));
        reviewBtn.SetActive(SmallFuncManager.Instance.IsReviewOpen());
        DisplaySuperVipBtn();
    }
    void DisplaySuperVipBtn()
    {
        bool isOpen = SuperVipManager.Instance.IsEntryOpen();
        superVIPBtn.SetActive(isOpen);
    }
    //显隐功能栏
    public void ShowFuncCol(bool _isShow)
Main/System/SuperVIP.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ac4a464f1ab9e5b4b9d48b510bf810f5
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/System/SuperVIP/SuperVIPWin.cs
New file
@@ -0,0 +1,45 @@
using UnityEngine;
public class SuperVIPWin : UIBase
{
    [SerializeField] ItemCell[] itemCells;
    [SerializeField] ButtonEx closeBtn;
    SuperVipManager manager => SuperVipManager.Instance;
    protected override void InitComponent()
    {
        closeBtn.SetListener(CloseWindow);
    }
    protected override void OnPreOpen()
    {
        DisplayRewards();
    }
    protected override void OnPreClose()
    {
    }
    void DisplayRewards()
    {
        var rewards = manager.customerServiceRewards;
        if (rewards == null) return;
        for (int i = 0; i < itemCells.Length; i++)
        {
            if (i < rewards.Length)
            {
                itemCells[i].SetActive(true);
                int itemID = rewards[i][0];
                long count = rewards[i][1];
                itemCells[i].Init(new ItemCellModel(itemID, false, count));
                itemCells[i].button.SetListener(() => ItemTipUtility.Show(itemID));
            }
            else
            {
                itemCells[i].SetActive(false);
            }
        }
    }
}
Main/System/SuperVIP/SuperVIPWin.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bd161ea74bfffe74dbefbf3b27562e98
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/System/SuperVIP/SuperVipManager.cs
New file
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using LitJson;
public class SuperVipManager : GameSystemManager<SuperVipManager>
{
    /// <summary>渠道门槛配置 {渠道名: 累充金额/元}</summary>
    public Dictionary<string, int> channelThresholdDict = new Dictionary<string, int>();
    /// <summary>客服领取奖励列表 [[物品ID, 个数], ...]</summary>
    public int[][] customerServiceRewards;
    public override void Init()
    {
        var config = FuncConfigConfig.Get("SuperVIP");
        channelThresholdDict = JsonMapper.ToObject<Dictionary<string, int>>(config.Numerical1);
        customerServiceRewards = JsonMapper.ToObject<int[][]>(config.Numerical2);
    }
    public override void Release()
    {
    }
    /// <summary>
    /// 判定SuperVIP入口是否开启
    /// 条件: 当前渠道在配置表中 且 历史累充 >= 配置门槛(元) * 100
    /// </summary>
    public bool IsEntryOpen()
    {
        var appId = VersionConfig.Get().appId;
        if (!channelThresholdDict.TryGetValue(appId, out var thresholdYuan))
            return false;
        return RechargeManager.Instance.realRecharge >= thresholdYuan * 100;
    }
}
Main/System/SuperVIP/SuperVipManager.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 92cc6ff4738f597499bc9e243696f16c
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant: