public virtual void UpdateButton(bool isLeft, OrganizeManager manager = null) { if (!((manager == null) ? this.IsValidShip() : manager.IsValidShip(this.ship.MemId))) { return; } if (!((manager == null) ? this.IsValidUnset() : manager.IsValidUnset(this.ship.MemId))) { return; } if (isLeft && this.buttonManager.nowForcusButton != this.LeftButton) { this.RightButton.SetState(UIButtonColor.State.Normal, true); this.LeftButton.SetState(UIButtonColor.State.Hover, true); this.buttonManager.nowForcusButton = this.LeftButton; SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove); } else if (!isLeft && this.buttonManager.nowForcusButton != this.RightButton) { this.RightButton.SetState(UIButtonColor.State.Hover, true); this.LeftButton.SetState(UIButtonColor.State.Normal, true); this.buttonManager.nowForcusButton = this.RightButton; SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove); } }
public virtual void UpdateButton(bool isLeft, OrganizeManager manager = null) { if ((manager?.IsValidShip(ship.MemId) ?? IsValidShip()) && (manager?.IsValidUnset(ship.MemId) ?? IsValidUnset())) { if (isLeft && buttonManager.nowForcusButton != LeftButton) { RightButton.SetState(UIButtonColor.State.Normal, immediate: true); LeftButton.SetState(UIButtonColor.State.Hover, immediate: true); buttonManager.nowForcusButton = LeftButton; SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove); } else if (!isLeft && buttonManager.nowForcusButton != RightButton) { RightButton.SetState(UIButtonColor.State.Hover, immediate: true); LeftButton.SetState(UIButtonColor.State.Normal, immediate: true); buttonManager.nowForcusButton = RightButton; SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove); } } }