public void ResetFlag() { Load_level(current_level); GameObject.Find("Color_Object").GetComponent <InitMap>().Init(); InitMap init = GameObject.Find("Color_Object").GetComponent <InitMap>(); init.ShowHideHint(); }
public void Load_next_level() { GameObject.Find("Color_Object").GetComponent <InitMap>().Reset(); current_level++; if (current_level > max_level) { current_level = 1; } Load_level(current_level); GameObject.Find("Color_Object").GetComponent <InitMap>().Init(); InitMap init = GameObject.Find("Color_Object").GetComponent <InitMap>(); init.ShowHideHint(); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); InitMap initMap = new InitMap(); initMap.InitAllMaps(); //IoC GlobalConfiguration.Configuration.Services.Replace( typeof(IHttpControllerActivator), new WindsorCompositionRoot(this.container)); //Service locator for attributes ServiceLocator.SetLocatorProvider(() => new WindsorServiceLocator(container)); }
void Load_level(int level) { ResetZoom(); UpdateMatchPercentage(0); if (current_level > max_level) { current_level = 1; } if (mode == "BEGINNER") { PlayerPrefs.SetInt("LastBeginnerLevelCracked", level); if (Application.platform == RuntimePlatform.Android) { GameServices.ReportScore(level, EM_GameServicesConstants.Leaderboard_Champions); if (level == 10) { GameServices.UnlockAchievement(EM_GameServicesConstants.Achievement_10_Flags); GameServices.ShowAchievementsUI(); } } else if (Application.platform == RuntimePlatform.IPhonePlayer) { Debug.Log("Not supported on iOS"); } } if (mode == "CHALLENGE") { PlayerPrefs.SetInt("LastChallengeLevelCracked", level); } if (mode == "EXPERT") { PlayerPrefs.SetInt("LastExpertLevelCracked", level); } //Replace sprites //original image //string original = "Flags/" + GetCountryForLevel(current_level) + "/" + GetCountryForLevel(current_level) + "_original"; string original = "Flags/" + "Resized/" + GetCountryForLevel(current_level) + "_original"; Sprite original_flag = Resources.Load <Sprite>(original); original_gb.GetComponent <Image>().sprite = original_flag; //string bw = "Flags/" + GetCountryForLevel(current_level) + "/" + GetCountryForLevel(current_level) + "_bw"; string bw = "Flags/Resized/" + GetCountryForLevel(current_level) + "_bw"; Sprite bw_flag = Resources.Load <Sprite>(bw); GameObject.Find("EditableMap").GetComponent <Image>().sprite = bw_flag; GameObject.Find("Color_Object").GetComponent <InitMap>().Initiate(); current_time = timerSpeed; //if ((current_level % 5 == 0) && (mode == "BEGINNER")) // LoadAdForBeginner(); InitMap init = GameObject.Find("Color_Object").GetComponent <InitMap>(); init.ShowHideHint(); Button next_btn = GameObject.Find("Next_button").GetComponent <Button>(); next_btn.interactable = false; boTimerActive = true; //Hide Particle System GameObject particles = GameObject.Find("Particles"); if (particles) { particles.SetActive(false); } setDyKInfo(); }