/// <summary> /// Function to make to control of movement and resizing operations also to change the selected element. /// Should be called in Update() of Monobehavior always that menu will be displayed /// </summary> public override void Update() { int before = menuIndex.Get(); base.Update(); if (before != menuIndex.Get()) { selectedImage = new BlinkTexture(abilities[menuIndex.Get()].texture, blinkControl); } selectedImage.Update(); if (adjustToSquare) { menuArea.AdjustToSquare(); } }
public override void Update() { int before = menuIndex.Get(); base.Update(); if (menuIndex.Get() >= abilities.Count) { if (before == 0) { menuIndex.Set(abilities.Count - 1); } else { menuIndex.Set(0); } } if (before != menuIndex.Get()) { selectedImage = new BlinkTexture(abilities[menuIndex.Get()].texture, blinkControl); } selectedImage.Update(); }
public override void Update() { int before = menuIndex.Get(); base.Update(); if (before != menuIndex.Get()) { if (elements.Count > 0) { selectedImage = new BlinkTexture(elements[menuIndex.Get()].texture, blinkControl); } } selectedImage.Update(); elementImage.AdjustToSquare(); }
/// <summary> /// Function to make to control of movement and resizing operations also to change the selected element. /// Should be called in Update() of Monobehavior always that menu will be displayed /// </summary> public void Update(int selectedWeapon) { if (uiManager.mode != UIManager.Mode.PAUSED) { menuArea.centerPosition = gameManager.getCurrentCamera().GetTargetPosition(); } int before = menuIndex.Get(); base.Update(); if (before != menuIndex.Get()) { selectedImage = new BlinkTexture(weapons.GetWeapon((Commandments.Weapon)menuIndex.Get()).elementActivated, blinkControl); } selectedImage.Update(); }
public void Update() { base.Update(); selectedBorderBlinked.Update(); }