public void Init() { allTips = JsonFile.ReadFromFile <JsonList <Tips> >("Text/", "tipsInfo").ToList(); Mediator.AddValue(this, "ownTips", "nowTips", "ownNowTips"); Mediator.AddListener(this, "getTips", "onLoadOwnTipsId", "getAllTips", "getThisLevelTips"); }
public void Init() { productList = JsonFile.ReadFromFile <JsonList <Product> >("Text/", "productInfo").ToList(); timer = new Timer(60f, false, timerText, TimeOut);//看完之后必须等60秒才能看第二个 Mediator.AddListener(this, "onProcessPurchased", "startWatchAdTimer", "updateWatchAdTimer", "onLoadOwnProductId"); Mediator.AddValue(this, "productList", "removeAd", "watchAdTimeOut"); }
public void Init() { GetPhysicalAddress(); manager = new MySqlManager("23.105.221.177", "feedback", "feedback", "1344710445"); manager.onSqlConnected += OnSqlConnected; manager.OpenSqlConnection(); Mediator.AddListener(this, "feedback"); Mediator.AddValue(this, "reply"); }
private void Awake() { foreach (Transform child in transform) { overallDic.Add(int.Parse(child.name.Split('_')[0]), child.gameObject); } Mediator.AddListener(this, "openOverall"); Mediator.AddValue(this, "nowOverall"); }
private void Awake() { foreach (Transform child in transform) { partDic.Add(int.Parse(child.name.Split('_')[0]), child.gameObject); } Mediator.AddListener(this, "openPart", "closePart"); Mediator.AddValue(this, "nowPart"); }
private void Awake() { foreach (Transform child in transform) { mixDic.Add(int.Parse(child.name.Split('_')[0]), child); } Mediator.AddListener(this, "setActiveProps", "closeMakeUp"); Mediator.AddValue(this, "mixProp"); }
public void Init() { GameSetting setting = JsonFile.ReadFromFile <GameSetting>("Text/", "gameSetting"); gameId = setting.gameId; #if UNITY_IOS developerId = setting.iosDeveloperId; appId = setting.iosAppId; #elif UNITY_ANDROID developerId = setting.androidDeveloperId; appId = setting.androidAppId; #endif MonoManager.mono.StartCoroutine(ConnectionMySql()); Mediator.AddListener(this, "openLikeUrl", "openMoreGameUrl", "startOpenLikeUrl"); Mediator.AddValue(this, "showInters", "shareUrl", "shareImageUrl"); }
public void Init() { var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance()); foreach (var product in Mediator.GetValue("productList") as List <Product> ) { if (product.type == ProductType.Coin) { builder.AddProduct(product.id, UnityEngine.Purchasing.ProductType.Consumable); } else { builder.AddProduct(product.id, UnityEngine.Purchasing.ProductType.NonConsumable); } } UnityPurchasing.Initialize(this, builder); Mediator.AddListener(this, "buyProduct", "restore"); Mediator.AddValue(this, "coin1Price", "coin2Price"); }
public void Init() { GameSetting setting = JsonFile.ReadFromFile <GameSetting>("Text/", "gameSetting"); if (setting.deleteData == true) { DeleteData(); } Mediator.AddListener(this, "onAddGem", "addCoin", "onUnlockLevelUpdate", "onReviewed", "showRewardAd", "onOwnTipsUpdate", "deleteData", "onOwnProductUpdate", "updateOwnProps" ); Mediator.AddValue(this, "coin", "reviewed", "rewardGem", "rewardNumber"); }
public void Init() { audioList = new List <AudioClip>(Resources.LoadAll <AudioClip>("Audio/")); if (GameObject.Find("[BgAudioSource]") == null) { var obj = new GameObject("[BgAudioSource]"); Object.DontDestroyOnLoad(obj); bgAudioSource = obj.AddComponent <AudioSource>(); } if (GameObject.Find("[ActionAudioSource]") == null) { var obj = new GameObject("[ActionAudioSource]"); Object.DontDestroyOnLoad(obj); actionAudioSource = obj.AddComponent <AudioSource>(); } InitAudioSource(); //PlayBgAudio(); Mediator.AddListener(this, "playAudio", "soundOn", "soundOff", "playBgAudio"); Mediator.AddValue(this, "soundOn"); }
public void Init() { GameSetting setting = JsonFile.ReadFromFile <GameSetting>("Text/", "gameSetting"); #if UNITY_IOS admobGeneralBannerUnitId = setting.admobIosGeneralBannerUnitId; admobCubeBannerUnitId = setting.admobIosCubeBannerUnitId; admobIntersUnitId = setting.admobIosIntersUnitId; admobRewardUnitId = setting.admobIosRewardUnitId; unityAdsGameId = setting.unityIosAdsGameId; unityPlacementId = setting.unityIosPlacementId; #endif InitAD(); LocalAdManager.GetInstance().Init(); Mediator.AddListener(this, "onRemoveAd", "showRewardAd", "showTopBanner", "hideBanner", "showIntersAd", "showTimerIntersAd", "showCubeBanner", "onLoadedLevel"); Mediator.AddValue(this, "rewardAdIsReady"); intersTimer = new Timer(120, false, () => { showTimerInters = true; });//隔120s显示插屏 intersTimer.Start(); }
public void Init() { CoroutineManager.StartCoroutine(ConnectionMySql()); Mediator.AddValue(this, "moreGameInfo"); }
public void Init() { dataList = JsonFile.ReadFromFile <JsonList <LocalBannerData> >("Text/", "localBannerInfo").ToList(); Mediator.AddValue(this, "bannerData", "cubeBannerData"); }
public void Init() { allProps = JsonFile.ReadFromFile <JsonList <Props> >("Text/", "propsInfo").ToList(); Mediator.AddListener(this, "getProps", "setActiveProps", "useProps", "onLoadedLevel", "deleteProps", "onLoadOwnPropsId"); Mediator.AddValue(this, "activeProps"); }
private void Awake() { allLevel = JsonFile.ReadFromFile <JsonList <Level> >("Text/", "levelInfo").ToList(); Mediator.AddListener(this, "loadLevel", "passLevel", "onLoadUnlockLevelId", "unlockAllLevel"); Mediator.AddValue(this, "nowLevel", "allLevel", "unlockLevel"); }