/// <summary> /// Initializes game state before the game starts. /// </summary> void Awake(){ if(instance == null){ // making sure we only initialize one instance. instance = this; GameObject.DontDestroyOnLoad(this.gameObject); Initialize(); } else { // Destroying unused instances. GameObject.Destroy(this.gameObject); } }
/// <summary> /// Initializes game state before the game starts. /// </summary> void Awake() { if (instance == null) // making sure we only initialize one instance. { instance = this; GameObject.DontDestroyOnLoad(this.gameObject); Initialize(); } else // Destroying unused instances. { GameObject.Destroy(this.gameObject); } }
public void onVungleAdViewed(string message) { SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY onVungleAdViewed:" + message); JSONObject eventJSON = new JSONObject(message); bool completed = eventJSON["completed"].b; double timeWatched = eventJSON["timeWatched"].n; if (completed && savedReward != null) { savedReward.Give(); savedReward = null; } SoomlaVungle.OnVungleAdViewed(completed, timeWatched); }
public void onVungleHasAds(string message) { SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY onVungleHasAds:" + message); SoomlaVungle.OnVungleHasAds(); }
public void onVungleAdStart(string message) { SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY onVungleAdStart:" + message); SoomlaVungle.OnVungleAdStart(); }