示例#1
0
    //方法,执行按下评论按钮之后的操作
    public void CommentButtonClick()
    {
        //播放按钮音效
        MyClass.AudioPlay(mainAudioSource, MyClass.AudioResources[1], MyClass.audioEnable);

        //调用评论相关的网络功能
        SdkToU3d.Comment();
    }
示例#2
0
    //方法,执行评论按钮被点击之后的操作
    public void RateButtonClick()
    {
        //如果设置界面响应点击
        if (settingInterfaceClickEnable)
        {
            #if (IOS_SDK)
            //评论
            SdkToU3d.Comment();

            //按钮追踪
            SdkToU3d.TrackButtonActionWithName("RateButton");
            #endif

            //播放按钮音效
            MyClass.AudioPlay(soundPlayer, Resources.Load <AudioClip>("Audio/Button"), MyClass.soundEnable);
        }
    }
示例#3
0
    //方法,道具界面的评论按钮点击之后的操作
    public void RateGameButtonClick()
    {
        //如果道具界面响应点击
        if (propertyInterfaceClickEnable)
        {
            //如果玩家是第一次通过道具界面评论该游戏
            if (MyClass.firstRateFromPropertyInterface == 1)
            {
                #if (IOS_SDK)
                //评论
                SdkToU3d.Comment();

                //按钮追踪
                SdkToU3d.TrackButtonActionWithName("RateGameButton");
                #endif

                //播放按钮音效
                MyClass.AudioPlay(soundPlayer, Resources.Load <AudioClip>("Audio/Button"), MyClass.soundEnable);

                //玩家获得道具点数奖励
                MyClass.propertyPoints += 100;

                //更新道具点数
                RefreshPropertyPoints();

                //更新差额道具点数
                propertyInterface.GetComponent <PropertyInterface>().RefreshDifferentialPropertyPoints();

                //状态标识位改变
                MyClass.firstRateFromPropertyInterface = 0;

                //将玩家是否是第一次通过道具界面评论该游戏的状态标志位存入玩家偏好中
                PlayerPrefs.SetInt("firstRate", MyClass.firstRateFromPropertyInterface);

                //道具界面不再响应点击
                propertyInterfaceClickEnable = false;

                //播放道具界面离场动画
                propertyInterface.GetComponent <Animator>().SetTrigger("PropertyInterfaceOut");
            }
        }
    }