コード例 #1
0
    void OnClickOnOK(GameObject go)
    {
        GlobalAudioMgr.Instance.PlayOrdianryMusic(Audio.OrdianryMusic.m_BtnMusic);

        //if (SDKMgr.IS_SDK_CHANNEL || SDKMgr.IS_APP_STORE_VER)
        {
            //System.UInt64 user_item_id = PlayerRole.Instance.RoleInfo.RoleMe.GetUserID();
            //user_item_id = (user_item_id << 32) | m_ItemID;
            //const int change = 100;
            //if (m_PayType == PayType.Diamond)
            //{
            //    SDKMgr.Instance.SDK.Pay(m_Amount * change, "钻石", m_Count,m_ProductID, user_item_id.ToString(), m_ItemID);
            //}
            //else if (m_PayType == PayType.Gold)
            //{
            //    SDKMgr.Instance.SDK.Pay(m_Amount * change, "金币", m_Count, m_ProductID, user_item_id.ToString(), m_ItemID);
            //}

            CG_Cmd_CreateOrder ncb = new CG_Cmd_CreateOrder();
            ncb.SetCmdType(NetCmdType.CMD_CG_CreateOrder);
            ncb.ID = m_ItemID;
            NetServices.Instance.Send <CG_Cmd_CreateOrder>(ncb);
        }
        //else
        //{
        //    PlayerRole.Instance.RoleRecharge.SendRecharge(m_ItemID, SDKMgr.Instance.IsServerOrder);
        //}

        ShutDown();
        GlobalHallUIMgr.Instance.ShutDownPayWnd();
        //SDKMgr.Instance.SDK.Pay();
        GlobalAudioMgr.Instance.PlayOrdianryMusic(Audio.OrdianryMusic.m_CloseUI);
        // ShutDown();
    }
コード例 #2
0
    void OnGetReward(GameObject go)
    {
        GlobalAudioMgr.Instance.PlayOrdianryMusic(Audio.OrdianryMusic.m_BtnMusic);

        if (PlayerRole.Instance.RoleMonthCard.IsInMonthCard())
        {
            PlayerRole.Instance.RoleMonthCard.GetRoleMonthCardReward();
        }
        else
        {
            uint ItemID = 13;
            if (SDKMgr.IS_SDK_CHANNEL || SDKMgr.IS_APP_STORE_VER)
            {
                //System.UInt64 user_item_id = PlayerRole.Instance.RoleInfo.RoleMe.GetUserID();
                //user_item_id = (user_item_id << 32) | ItemID;
                //if (FishConfig.Instance.m_FishRecharge.m_FishRechargeMap.ContainsKey(ItemID))
                //{
                //    tagFishRechargeInfo info = FishConfig.Instance.m_FishRecharge.m_FishRechargeMap[ItemID];
                //    int price = (int)info.dDisCountPrice * 100;

                //    SDKMgr.Instance.SDK.Pay(price, "月卡", 1, info.ProductID, user_item_id.ToString(), (int)ItemID);
                //}

                CG_Cmd_CreateOrder ncb = new CG_Cmd_CreateOrder();
                ncb.SetCmdType(NetCmdType.CMD_CG_CreateOrder);
                ncb.ID = 13;
                NetServices.Instance.Send <CG_Cmd_CreateOrder>(ncb);
            }
            else
            {
                PlayerRole.Instance.RoleRecharge.SendRecharge(ItemID, SDKMgr.Instance.IsServerOrder);
            }
        }
    }
コード例 #3
0
    void OnClickOnOK(GameObject go)
    {
        GlobalAudioMgr.Instance.PlayOrdianryMusic(Audio.OrdianryMusic.m_BtnMusic);

        CG_Cmd_CreateOrder ncb = new CG_Cmd_CreateOrder();

        ncb.SetCmdType(NetCmdType.CMD_CG_CreateOrder);
        ncb.ID      = (int)SDKMgr.Instance.PayData.ItemID;
        ncb.PayType = (int)SDKMgr.Instance.PayData.PayChannel;
        NetServices.Instance.Send <CG_Cmd_CreateOrder>(ncb);

        ShutDown();
        //GlobalHallUIMgr.Instance.ShutDownPayWnd();
        GlobalAudioMgr.Instance.PlayOrdianryMusic(Audio.OrdianryMusic.m_CloseUI);
    }