public void FinishTurn() { SeparatePanel.SetActive(false); MergePanel.SetActive(false); CityPanel.SetActive(false); FinishButton.SetActive(false); //PlayerTurn(); enemigo.LlamarCorutinaEnemigo(); }
private void CheckPush(Scene_CitySceneTableItem item, CityPanel citypan) { citypan.mItem = item; if (0 == item.resID || (Pdm.isLevel(item) && !Pdm.isLock(item))) { mUnlocks.Add(citypan); } else { mlocks.Add(citypan); } }
public void FillForm(AutomationPracticeFromModel user) { SignInButton.Click(); WaitForLoad(); EmailSectionOnCheateAccount.Click(); FillEmail(user); WaitForLoad(); CreateAccountButton.Click(); WaitForLoad(); LastNamePanel.SendKeys(user.LastNamePanel + Keys.Tab); FirstNamePanel.SendKeys(user.FirstNamePanel + Keys.Tab); PasswordPanel.SendKeys(user.PasswordPanel + Keys.Tab); AddressPanel.SendKeys(user.AddressPanel + Keys.Tab); CityPanel.SendKeys(user.CityPanel + Keys.Tab); IdStatePanel.SendKeys(user.IdStatePanel + Keys.Tab); PhoneMobile.SendKeys(user.PhoneMobile + Keys.Tab); PosteCodePanel.SendKeys(user.PosteCodePanel + Keys.Tab); }
private void Awake() { producer = GameObject.Find("Producer").GetComponent <Producer> (); turnValue = GameObject.Find("TurnValue").GetComponent <Text> (); playerValue = GameObject.Find("PlayerValue").GetComponent <Text> (); provincePanel = GameObject.Find("ProvincePanel").GetComponent <ProvincePanel> (); cityPanel = GameObject.Find("CityPanel").GetComponent <CityPanel> (); infraPanel = GameObject.Find("InfraPanel").GetComponent <InfraPanel> (); armedForcePanel = GameObject.Find("ArmedForcePanel").GetComponent <ArmedForcePanel> (); unitsPanel = GameObject.Find("UnitsPanel").GetComponent <UnitsPanel> (); provincePanel.gameObject.SetActive(false); cityPanel.gameObject.SetActive(false); infraPanel.gameObject.SetActive(false); armedForcePanel.gameObject.SetActive(false); unitsPanel.gameObject.SetActive(false); }
private void onEnterScene(GameObject gameObj) { int resId = System.Convert.ToInt32(gameObj.name); CityPanel citypan = null; foreach (CityPanel temp in mUnlocks) { if (temp.GetResId() == resId) { citypan = temp; } } if (null == citypan) { return; } BaseScene scn = SceneManager.Instance.GetCurScene(); PlayerDataModule module = ModuleManager.Instance.FindModule <PlayerDataModule>(); if (null == scn || null == module) { return; } if (scn.GetSceneResId() == citypan.GetResId()) { OnCloseClick(); return; } if (citypan.mItem.mUnlock > module.GetLevel()) { return; } SceneManager.Instance.RequestEnterScene(citypan.GetResId()); }
private void UpdateLockUI() { isplay = false; foreach (int resid in Pdm.mPlayerNewMapData) { if (0 == resid) { continue; } if (!Pdm.mPlayerOldMapData.Contains(resid)) { CityPanel temp = Findpanel(resid); if (null == temp) { return; } string[] str = temp.mItem.GetBg(temp.mItem); if (null == str) { Debug.LogError("scene_city.txt error"); return; } temp.mLock.gameObject.SetActive(true); UIAtlasHelper.SetButtonImage(temp.mMapBtn, str[1], true); temp.mCondition.gameObject.SetActive(true); temp.mCondition.text = Pdm.getDictData(temp.GetResId()); Pdm.UpdateMapData(temp.GetResId(), true); UISpriteAnimation ani = AnimationManager.Instance.AddSpriteAnimation("unlock", temp.mLock.gameObject, 15, 8, true, false); ani.transform.localPosition = new Vector3(ani.transform.localPosition.x, ani.transform.localPosition.y - 22, ani.transform.localPosition.z); temp.mLock.gameObject.name = str[0]; ani.loop = false; isplay = true; ani.onFinished += DestroyUnlock; } } }
public void NextGroup() { SeparatePanel.SetActive(false); MergePanel.SetActive(false); aux = aux + 1; if (Groups.Count > aux) { if (Groups[aux] == null) { NextGroup(); } UnitMovement.text = ""; GameManager.GetComponent <MovingManager>().NewAssigmentGroup(Groups[aux]); Groups[aux].GetComponent <PlayerMovement>().NextTurn(); } else { UnitPanel.SetActive(false); CityPanel.SetActive(true); } }
private void Context_LocationUpdate(object sender, ViewModels.Events.LocationUpdateEventArgs e) { var ui = Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.High, new Windows.UI.Core.DispatchedHandler(async() => { CityPanel.Navigate(typeof(CitiesSetting)); if (Context.EnableLocate) { var accessStatus = await Geolocator.RequestAccessAsync(); if (accessStatus == GeolocationAccessStatus.Allowed) { try { var _geolocator = new Geolocator(); var pos = await _geolocator.GetGeopositionAsync(); if ((_geolocator.LocationStatus != PositionStatus.NoData) && (_geolocator.LocationStatus != PositionStatus.NotAvailable) && (_geolocator.LocationStatus != PositionStatus.Disabled)) { await CalcPosition(pos); } else { FailtoPos(); } } catch (Exception) { FailtoPos(); } } else { DeniePos(); } } })); }
public void PlayerTurn() { Food += 10; Food -= Units; RecourseText.text = "Alimento: " + Food.ToString("0000") + " Rec.Construcción: " + Resources.ToString("0000") + '\n' + " Unidades: " + Units + " / " + MaxUnits; FinishButton.SetActive(true); if (Groups.Count > 0) { aux = 0; UnitPanel.SetActive(true); //llama a mover grupo if (Groups[aux] == null) { NextGroup(); } GameManager.GetComponent <MovingManager>().NewAssigmentGroup(Groups[aux]); Groups[aux].GetComponent <PlayerMovement>().NextTurn(); } else { CityPanel.SetActive(true); } }