public void SwitchToSection(GameObject section) { if (AnimationAssistant.IsShown(section.GetComponent <CanvasGroup>())) { return; } _deactivateCurrentSection(); AnimationAssistant.SwitchFromTo(_activeSection.GetComponent <CanvasGroup>(), section.GetComponent <CanvasGroup>()); _activeSection = section; switch (section.name) { case "ProgrammeView": _changeCaseToActive(_programmeCase); break; case "NewsView": _changeCaseToActive(_newsCase); break; case "NavigationView": _changeCaseToActive(_navigationCase); _gradient.alpha = 0f; break; } }
private void _show(string address) { if (!address.Equals("")) { AnimationAssistant.Show(_canvasGroup); } }
private IEnumerator _sendLoginData(string email) { var wwwForm = new WWWForm(); wwwForm.AddField("email", email); var www = new WWW(InfoStorage.Server + InfoStorage.Connect, wwwForm); yield return(www); Debug.Log(InfoStorage.Server + InfoStorage.Connect); if (www.error != null) { yield break; } Debug.Log(www.text); var json = JSON.Parse(www.text); string answer = json["error"]; Debug.Log(answer); if (!answer.Equals("ok")) { yield break; } PlayerPrefs.SetString("email", email); PlayerPrefs.SetInt("auntificated", 1); AnimationAssistant.MoveY(transform, transform.position.y - Screen.height); }
public void SwitchToCase(Transform _dateList) { if (AnimationAssistant.IsShown(_dateList.GetComponent <CanvasGroup>())) { return; } _deactivateCurrentCase(); AnimationAssistant.SwitchFromTo(_activeDateList.GetComponent <CanvasGroup>(), _dateList.GetComponent <CanvasGroup>()); _activeDateList = _dateList; _mainScrollRect.content = _dateList as RectTransform; _updateIndicator.SetList(_dateList); switch (_dateList.name) { case "Programme12Date": _changeCaseToActive(_date12); break; case "Programme13Date": _changeCaseToActive(_date13); break; case "Programme14Date": _changeCaseToActive(_date14); break; case "Programme15Date": _changeCaseToActive(_date15); break; } }
private IEnumerator _animateIndicatorCoroutine() { while (_rotate) { AnimationAssistant.LocalRotateZ180(_indicator); yield return(new WaitForSeconds(AnimationAssistant.AnimationSpeedDefault)); } }
public void Open() { if (_opened) { return; } _opened = true; AnimationAssistant.MoveX(transform, _xOpened); }
public void Close() { if (!_opened) { return; } _opened = false; AnimationAssistant.MoveX(transform, _xClosed); }
public void Close() { if (!_opened) { return; } _helper.PanelClose(); _opened = false; AnimationAssistant.MoveY(transform, InfoStorage.ClosedPanelPosY); }
public void Open() { if (_opened) { return; } _helper.Increase(); _opened = true; AnimationAssistant.MoveY(transform, InfoStorage.OpenedPanelPosY); }
private IEnumerator _loginFormUpCoroutine() { yield return(new WaitForSeconds(0.5f)); AnimationAssistant.Hide(gameObject.GetComponent <CanvasGroup>()); if (PlayerPrefs.GetInt("auntificated") != 1) { AnimationAssistant.MoveLocalY(_loginForm, 0); } else { AnimationAssistant.MoveY(_loginPanel, InfoStorage.ClosedPanelPosY); } }
public void Escape() { if (_lock) { return; } switch (_context) { case Context.Feedback: AnimationAssistant.MoveY(_feedback, _feedback.transform.position.y - PlayerPrefs.GetFloat("height")); _context = Context.Main; break; case Context.Instagram: AnimationAssistant.MoveY(_instagram, _instagram.transform.position.y - PlayerPrefs.GetFloat("height")); _context = Context.Main; break; } }
public void SendScore(int value) { for (var i = 0; i < transform.childCount; i++) { transform.GetChild(i).GetComponent <Image>().sprite = _inactiveStar; } for (var i = 0; i < value; i++) { transform.GetChild(i).GetComponent <Image>().sprite = _activeStar; } var score = new Score(value, InfoStorage.DateTimeToUnixTimeStamp(DateTime.Now.Date)); var dtnow = DateTime.Now; PlayerPrefs.SetInt(dtnow.Year + "." + dtnow.Month + "." + dtnow.Day, value); AnimationAssistant.Hide(_cg); StartCoroutine(_sendScoreCoroutine(score)); }
private IEnumerator _sendQuestionCoroutine(string text) { var wwwForm = new WWWForm(); wwwForm.AddField("text", text); wwwForm.AddField("email", PlayerPrefs.GetString("email")); var www = new WWW(InfoStorage.Server + InfoStorage.QuestionApi, wwwForm); yield return(www); if (www.error == null) { AnimationAssistant.QuestionAnimation(_form, _success); } else { _questions.Enqueue(text); EventStorage.Instance.ConnectionEstablished.AddListener(_sendAllCachedQuestions); AnimationAssistant.QuestionAnimation(_form, _failure); } }
public void DecreaseZoomAndUpdate() { if (_updateLock) { return; } _updateLock = true; if (_zoom == MinZoom + 1) { AnimationAssistant.Hide(_minus); } if (!AnimationAssistant.IsShown(_plus)) { AnimationAssistant.Show(_plus); } _zoom--; _refreshMap(); }
public void OnPointerClick(PointerEventData eventData) { AnimationAssistant.ButtonEffect(transform); _es.OpenMaps.Invoke(); }
private void _expand() { _expanded = true; AnimationAssistant.ExpandAndFade(_rt, new Vector2(_rt.sizeDelta.x, _vlg.preferredHeight), _cg, 1f, true); }
private void _narrow() { _expanded = false; AnimationAssistant.ExpandAndFade(_rt, new Vector2(_rt.sizeDelta.x, 0), _cg, 0f, false); }
public void OnPointerClick(PointerEventData eventData) { _eventStorage.MapToDefault.Invoke(); AnimationAssistant.LocalRotateZ180(transform); }
private void _narrowText() { AnimationAssistant.ExpandRect(_rt, new Vector2(_rt.sizeDelta.x, InfoStorage.MaxDefaultTextSize)); _expanded = false; }
private void _expandText() { AnimationAssistant.ExpandRect(_rt, new Vector2(_rt.sizeDelta.x, _text.preferredHeight)); _expanded = true; }
void Awake() { main = this; }
protected void _changeCaseToActive(Transform caseObj) { AnimationAssistant.ChangeTextColor(caseObj.FindChild("Text").GetComponent <Text>(), ActiveTextColor); AnimationAssistant.ImageColor(caseObj.GetComponent <Image>(), ActiveColor); }
public void OnPointerClick(PointerEventData eventData) { _eventStorage.MapToUser.Invoke(); AnimationAssistant.ButtonEffect(transform); }
private void _hide() { AnimationAssistant.Hide(_canvasGroup); }
private void _show() { AnimationAssistant.Show(_canvasGroup); }
public void Notify(string notification) { _text.text = notification; AnimationAssistant.FadeText(_text, 1); }
public void StopCurrent() { _text.text = ""; AnimationAssistant.FadeText(_text, 0); }
private void _initializeFirst() { _changeCaseToActive(_programmeCase); AnimationAssistant.Show(_activeSection.GetComponent <CanvasGroup>()); }