進捗データ計測追加
This commit is contained in:
parent
620070e42f
commit
b476d1a390
|
|
@ -7,6 +7,7 @@ using UniRx;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.PlayerLoop;
|
using UnityEngine.PlayerLoop;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
using GameAnalyticsSDK;
|
||||||
|
|
||||||
public class ShopLevelUp : MonoBehaviour
|
public class ShopLevelUp : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
@ -93,6 +94,13 @@ public class ShopLevelUp : MonoBehaviour
|
||||||
LocalCacheManager.Load<Action>(CallbackTag, null)?.Invoke();
|
LocalCacheManager.Load<Action>(CallbackTag, null)?.Invoke();
|
||||||
LocalCacheManager.Remove(CallbackTag);
|
LocalCacheManager.Remove(CallbackTag);
|
||||||
}
|
}
|
||||||
|
#if !DEVELOPMENT_BUILD && !UNITY_EDITOR
|
||||||
|
// 進捗計測
|
||||||
|
var progress = "level_" + String.Format("{0:00}", shopLevel);
|
||||||
|
// 進捗スコアを保存 TODO:暫定的にログインカウントを保存する
|
||||||
|
var score = GameDataManager.GameData.dailyLoginCount;
|
||||||
|
GameAnalytics.NewProgressionEvent(GAProgressionStatus.Complete, progress, score);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ShowDialog(int level, Action onComplete = null)
|
public static void ShowDialog(int level, Action onComplete = null)
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,16 @@
|
||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using GameAnalyticsSDK;
|
||||||
|
|
||||||
public sealed class AdManager : SingletonMonoBehaviour<AdManager> {
|
public sealed class AdManager : SingletonMonoBehaviour<AdManager> {
|
||||||
|
|
||||||
|
public static readonly string AD_PLACEMENT_COIN = "coin";
|
||||||
|
public static readonly string AD_PLACEMENT_CORNFIELD = "cornfield";
|
||||||
|
public static readonly string AD_PLACEMENT_CUSTOMER = "increase_customer";
|
||||||
|
public static readonly string AD_PLACEMENT_PERFECT = "perfect_popcorn";
|
||||||
|
public static readonly string AD_PLACEMENT_VIP = "vip_customer";
|
||||||
|
public static readonly string AD_PLACEMENT_AUTO = "auto_popcorn";
|
||||||
|
|
||||||
//-- ironSource --//
|
//-- ironSource --//
|
||||||
#if UNITY_IOS
|
#if UNITY_IOS
|
||||||
private static readonly string IRONSOURCE_APP_KEY = "11bc8b5ad";
|
private static readonly string IRONSOURCE_APP_KEY = "11bc8b5ad";
|
||||||
|
|
@ -107,7 +115,7 @@ public sealed class AdManager : SingletonMonoBehaviour<AdManager> {
|
||||||
return IronSource.Agent.isRewardedVideoAvailable();
|
return IronSource.Agent.isRewardedVideoAvailable();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
public void ShowRewardVideo(Action<bool> callback){
|
public void ShowRewardVideo(Action<bool> callback, string ad_placement = "none"){
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
callback(true);
|
callback(true);
|
||||||
#else
|
#else
|
||||||
|
|
@ -120,6 +128,9 @@ public sealed class AdManager : SingletonMonoBehaviour<AdManager> {
|
||||||
_rewardAdClose = false;
|
_rewardAdClose = false;
|
||||||
_async_frame_count = 0;
|
_async_frame_count = 0;
|
||||||
IronSource.Agent.showRewardedVideo();
|
IronSource.Agent.showRewardedVideo();
|
||||||
|
#if !DEVELOPMENT_BUILD && !UNITY_EDITOR
|
||||||
|
GameAnalytics.NewAdEvent(GAAdAction.FailedShow, GAAdType.RewardedVideo, "ironsource", ad_placement);
|
||||||
|
#endif
|
||||||
}else{
|
}else{
|
||||||
_rewardAdCallback(false);
|
_rewardAdCallback(false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ public static class Const {
|
||||||
|
|
||||||
public static readonly string UnityVersion = "2019.4.19f1";
|
public static readonly string UnityVersion = "2019.4.19f1";
|
||||||
|
|
||||||
public static readonly string DefaultAppVersion = "0.1.0";
|
public static readonly string DefaultAppVersion = "1.1.0";
|
||||||
|
|
||||||
// parameter
|
// parameter
|
||||||
public static readonly int DefaultMachineLevel = 1;
|
public static readonly int DefaultMachineLevel = 1;
|
||||||
|
|
|
||||||
|
|
@ -48,31 +48,31 @@ namespace MyGame.Scripts
|
||||||
normalWindow.SetActive(true);
|
normalWindow.SetActive(true);
|
||||||
coinObject.SetActive(true);
|
coinObject.SetActive(true);
|
||||||
messageText.text = ScriptLocalization.System.CoinMainMessage;
|
messageText.text = ScriptLocalization.System.CoinMainMessage;
|
||||||
SetButtonAction(closeButton, okButton);
|
SetButtonAction(closeButton, okButton, AdManager.AD_PLACEMENT_COIN);
|
||||||
break;
|
break;
|
||||||
case RewardType.CornField:
|
case RewardType.CornField:
|
||||||
normalWindow.SetActive(true);
|
normalWindow.SetActive(true);
|
||||||
fertilizerObject.SetActive(true);
|
fertilizerObject.SetActive(true);
|
||||||
messageText.text = ScriptLocalization.System.CornFieldMessage;
|
messageText.text = ScriptLocalization.System.CornFieldMessage;
|
||||||
SetButtonAction(closeButton, okButton);
|
SetButtonAction(closeButton, okButton, AdManager.AD_PLACEMENT_CORNFIELD);
|
||||||
break;
|
break;
|
||||||
case RewardType.IncreaseCustomer:
|
case RewardType.IncreaseCustomer:
|
||||||
normalWindow.SetActive(true);
|
normalWindow.SetActive(true);
|
||||||
publicityObject.SetActive(true);
|
publicityObject.SetActive(true);
|
||||||
messageText.text = ScriptLocalization.System.IncreaseCustomerMessage;
|
messageText.text = ScriptLocalization.System.IncreaseCustomerMessage;
|
||||||
SetButtonAction(closeButton, okButton);
|
SetButtonAction(closeButton, okButton, AdManager.AD_PLACEMENT_CUSTOMER);
|
||||||
break;
|
break;
|
||||||
case RewardType.PerfectPopcorn:
|
case RewardType.PerfectPopcorn:
|
||||||
normalWindow.SetActive(true);
|
normalWindow.SetActive(true);
|
||||||
messageText.text = ScriptLocalization.System.PerfectPopcornMessage;
|
messageText.text = ScriptLocalization.System.PerfectPopcornMessage;
|
||||||
SetButtonAction(closeButton, okButton);
|
SetButtonAction(closeButton, okButton, AdManager.AD_PLACEMENT_PERFECT);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetButtonAction(Button closeButton, Button okButton)
|
private void SetButtonAction(Button closeButton, Button okButton, string Placement)
|
||||||
{
|
{
|
||||||
closeButton.OnClickAsObservable().Take(1).Subscribe(_ =>
|
closeButton.OnClickAsObservable().Take(1).Subscribe(_ =>
|
||||||
{
|
{
|
||||||
|
|
@ -96,7 +96,7 @@ namespace MyGame.Scripts
|
||||||
LocalCacheManager.Remove(OkCallbackTag);
|
LocalCacheManager.Remove(OkCallbackTag);
|
||||||
}
|
}
|
||||||
TransitionManager.Instance.UnloadScene(GameScenes.WatchMovieCoin);
|
TransitionManager.Instance.UnloadScene(GameScenes.WatchMovieCoin);
|
||||||
});
|
}, Placement);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ MonoBehaviour:
|
||||||
- d078eab3b8d4a6b44ccfb7d9258a8e0bddad1337
|
- d078eab3b8d4a6b44ccfb7d9258a8e0bddad1337
|
||||||
- 41e0f225a9f8751a3fc893cae6eb933df7d0214e
|
- 41e0f225a9f8751a3fc893cae6eb933df7d0214e
|
||||||
Build:
|
Build:
|
||||||
- 1.0.1
|
- 1.1.0
|
||||||
- 1.0.0
|
- 1.1.0
|
||||||
SelectedPlatformOrganization:
|
SelectedPlatformOrganization:
|
||||||
- usaya
|
- usaya
|
||||||
- usaya
|
- usaya
|
||||||
|
|
@ -174,7 +174,6 @@ MonoBehaviour:
|
||||||
VerboseLogBuild: 0
|
VerboseLogBuild: 0
|
||||||
UseManualSessionHandling: 0
|
UseManualSessionHandling: 0
|
||||||
SendExampleGameDataToMyGame: 0
|
SendExampleGameDataToMyGame: 0
|
||||||
UseIMEI: 0
|
|
||||||
InternetConnectivity: 0
|
InternetConnectivity: 0
|
||||||
CustomDimensions01: []
|
CustomDimensions01: []
|
||||||
CustomDimensions02: []
|
CustomDimensions02: []
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue