Beispiel #1
0
 /// <summary>
 /// 完成任务
 /// </summary>
 /// <param name="missionName">任务名称</param>
 public void OnCompletedMission(string missionName)
 {
     if (!isRuntime)
     {
         return;
     }
     TDGAMission.OnCompleted(missionName);
 }
Beispiel #2
0
    public void PassStageHandle(object e, Hashtable hash)
    {
        Debug.Log("PassStageHandle");

        TDGAMission.OnCompleted(LogicManager.Instance.EnterStageInfo.StageID);

        account.SetLevel(StageDataPack.Instance.CurIdx);
    }
Beispiel #3
0
    void AchievementComplete(MDAchievement ach)
    {
//		bCompleteAchievement = true;
        //WG.SLog("AchievementComplete==="+SDK.Serialize(ach));
        WGAlertViewController.Self.showArchivementTipView(ach.name, ach.icon);
                #if TalkingData
        TDGAMission.OnBegin(ach.name + ach.id);
        TDGAMission.OnCompleted(ach.name + ach.id);
                #endif
    }
Beispiel #4
0
    public void MissionCompleted(string levelName, bool success, string cause = "")
    {
#if UNITY_ANDROID
        if (this.useTaklingData)
        {
            if (success)
            {
                TDGAMission.OnCompleted(levelName);
            }
            else
            {
                TDGAMission.OnFailed(levelName, cause);
            }
        }
#endif
    }
Beispiel #5
0
    void OnGUI()
    {
        int i = 0;

        GUI.Box(new Rect(10, 10, Screen.width - 20, Screen.height - 20), "Demo Menu");

        if (GUI.Button(new Rect(left, top + step * i++, width, height), "Create User"))
        {
            account = TDGAAccount.SetAccount("User" + index);
            index++;
        }

        if (GUI.Button(new Rect(left, top + step * i++, width, height), "Account Level +1"))
        {
            if (account != null)
            {
                account.SetLevel(level++);
            }
        }

        if (GUI.Button(new Rect(left, top + step * i++, width, height), "Chagen Game Server + 'a'"))
        {
            if (account != null)
            {
                gameserver += "a";
                account.SetGameServer(gameserver);
            }
        }

        if (GUI.Button(new Rect(left, top + step * i++, width, height), "Charge Request 10"))
        {
            TDGAVirtualCurrency.OnChargeRequest("order01", "iap", 10, "CH", 10, "PT");
        }

        if (GUI.Button(new Rect(left, top + step * i++, width, height), "Charge Success 10"))
        {
            TDGAVirtualCurrency.OnChargeSuccess("order01");
        }

        if (GUI.Button(new Rect(left, top + step * i++, width, height), "Reward 100"))
        {
            TDGAVirtualCurrency.OnReward(100, "reason");
        }

        if (GUI.Button(new Rect(left, top + step * i++, width, height), "Mission Begin"))
        {
            TDGAMission.OnBegin("miss001");
        }

        if (GUI.Button(new Rect(left, top + step * i++, width, height), "Mission Completed"))
        {
            TDGAMission.OnCompleted("miss001");
        }

        if (GUI.Button(new Rect(left, top + step * i++, width, height), "Item Purchase 10"))
        {
            TDGAItem.OnPurchase("itemid001", 10, 10);
        }

        if (GUI.Button(new Rect(left, top + step * i++, width, height), "Item Use 1"))
        {
            TDGAItem.OnUse("itemid001", 1);
        }

        if (GUI.Button(new Rect(left, top + step * i++, width, height), "Custome Event"))
        {
            Dictionary <string, object> dic = new Dictionary <string, object>();
            dic.Add("StartApp" + "StartAppTime", "startAppMac" + "#" + "02/01/2013 09:52:24");
            dic.Add("IntValue", 1);
            TalkingDataGA.OnEvent("action_id", dic);
        }
    }
Beispiel #6
0
 public void TDGAMissionOnCompleted(string missId, TalkDataMissionType talkDataMissionType)
 {
     TDGAMission.OnCompleted(GenerateMissionId(missId, talkDataMissionType));
 }
Beispiel #7
0
 public void EnterStageHandle(object e, Hashtable hash)
 {
     Debug.Log("EnterStageHandle");
     TDGAMission.OnCompleted(LogicManager.Instance.EnterStageInfo.StageID);
 }
    private void OnGUI()
    {
        int num = 0;

        GUI.Box(new Rect(10f, 10f, (float)(Screen.width - 20), (float)(Screen.height - 20)), "Demo Menu");
        if (GUI.Button(new Rect(90f, (float)(60 + 60 * num++), (float)this.width, 50f), "Create User"))
        {
            this.account = TDGAAccount.SetAccount("User" + this.index);
            this.index++;
        }
        if (GUI.Button(new Rect(90f, (float)(60 + 60 * num++), (float)this.width, 50f), "Account Level +1") && this.account != null)
        {
            this.account.SetLevel(this.level++);
        }
        if (GUI.Button(new Rect(90f, (float)(60 + 60 * num++), (float)this.width, 50f), "Chagen Game Server + 'a'") && this.account != null)
        {
            this.gameserver += "a";
            this.account.SetGameServer(this.gameserver);
        }
        if (GUI.Button(new Rect(90f, (float)(60 + 60 * num++), (float)this.width, 50f), "Charge Request 10"))
        {
            TDGAVirtualCurrency.OnChargeRequest("order01", "iap", 10.0, "CH", 10.0, "PT");
        }
        if (GUI.Button(new Rect(90f, (float)(60 + 60 * num++), (float)this.width, 50f), "Charge Success 10"))
        {
            TDGAVirtualCurrency.OnChargeSuccess("order01");
        }
        if (GUI.Button(new Rect(90f, (float)(60 + 60 * num++), (float)this.width, 50f), "Reward 100"))
        {
            TDGAVirtualCurrency.OnReward(100.0, "reason");
        }
        if (GUI.Button(new Rect(90f, (float)(60 + 60 * num++), (float)this.width, 50f), "Mission Begin"))
        {
            TDGAMission.OnBegin("miss001");
        }
        if (GUI.Button(new Rect(90f, (float)(60 + 60 * num++), (float)this.width, 50f), "Mission Completed"))
        {
            TDGAMission.OnCompleted("miss001");
        }
        if (GUI.Button(new Rect(90f, (float)(60 + 60 * num++), (float)this.width, 50f), "Item Purchase 10"))
        {
            TDGAItem.OnPurchase("itemid001", 10, 10.0);
        }
        if (GUI.Button(new Rect(90f, (float)(60 + 60 * num++), (float)this.width, 50f), "Item Use 1"))
        {
            TDGAItem.OnUse("itemid001", 1);
        }
        if (GUI.Button(new Rect(90f, (float)(60 + 60 * num++), (float)this.width, 50f), "Custome Event"))
        {
            TalkingDataGA.OnEvent("action_id", new Dictionary <string, object>
            {
                {
                    "StartAppStartAppTime",
                    "startAppMac#02/01/2013 09:52:24"
                },
                {
                    "IntValue",
                    1
                }
            });
        }
    }
Beispiel #9
0
 /// <summary>
 /// 任务完成
 /// </summary>
 /// <param name="missionId"></param>
 public void OnMissionCompleted(string missionId)
 {
     TDGAMission.OnCompleted(missionId);
 }
 public static void FinishLevel(string level)
 {
     TDGAMission.OnCompleted(level);
 }
Beispiel #11
0
    private void OnGUI()
    {
        int i = 0;

        GUI.Box(new Rect(10, 10, Screen.width - 20, Screen.height - 20), "Demo Menu");

        GUI.Label(new Rect(left, top + (step * i++), width, height), deviceId);
        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "getDeviceId"))
        {
            deviceId = TalkingDataGA.GetDeviceId();
        }

        GUI.Label(new Rect(left, top + (step * i++), width, height), oaid);
        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "getOAID"))
        {
            oaid = TalkingDataGA.GetOAID();
        }

        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "SetLocation"))
        {
            TalkingDataGA.SetLocation(39.94, 116.43);
        }

        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "Create Profile"))
        {
            profile = TDGAProfile.SetProfile("User" + index++);
        }

        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "Set Profile Name"))
        {
            if (profile != null)
            {
                profile.SetProfileName("name");
            }
        }

        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "Set Profile Type"))
        {
            if (profile != null)
            {
                profile.SetProfileType(ProfileType.WEIXIN);
            }
        }

        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "Set Level"))
        {
            if (profile != null)
            {
                profile.SetLevel(level++);
            }
        }

        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "Set Gender"))
        {
            if (profile != null)
            {
                profile.SetGender(Gender.MALE);
            }
        }

        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "Set Age"))
        {
            if (profile != null)
            {
                profile.SetAge(21);
            }
        }

        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "Set Game Server"))
        {
            if (profile != null)
            {
                profile.SetGameServer("server1");
            }
        }

        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "Mission Begin"))
        {
            TDGAMission.OnBegin("miss001");
        }

        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "Mission Completed"))
        {
            TDGAMission.OnCompleted("miss001");
        }

        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "Mission Failed"))
        {
            TDGAMission.OnFailed("miss001", "failed");
        }

        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "Charge Request"))
        {
            TDGAVirtualCurrency.OnChargeRequest("order01", "iap", 10, "CNY", 10, "UnionPay");
        }

        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "Charge Success"))
        {
            TDGAVirtualCurrency.OnChargeSuccess("order01");
        }

        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "Reward"))
        {
            TDGAVirtualCurrency.OnReward(100, "reason");
        }

        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "Item Purchase"))
        {
            TDGAItem.OnPurchase("itemid001", 10, 10);
        }

        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "Item Use"))
        {
            TDGAItem.OnUse("itemid001", 1);
        }

#if TDGA_CUSTOM
        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "Custome Event"))
        {
            Dictionary <string, object> dic = new Dictionary <string, object>
            {
                { "StringValue", "Pi" },
                { "NumberValue", 3.14 }
            };
            TalkingDataGA.OnEvent("action_id", dic);
        }
#endif
    }