private void OpenCloseMainMenu() { var sidebar = UIUtils.FindGUI("MenuMain/Sidebar"); sidebar.SetActive(true); float position; if (sidebar.transform.localPosition.x > -130) { position = -0.61f; State.ChangeState(eState.Exploring); } else { position = 0.61f; State.ChangeState(eState.MenuMain); } UIAnimation.MoveBy(sidebar, new Dictionary <string, object> { { "x", position }, { "easeType", iTween.EaseType.easeInOutExpo }, { "time", 0.5 } }); }