public override void Go() { if (By) Ease3.GoColorBy(this, Value.GetVector3(), Time, null, Complete.Invoke, Type, Delay, Repeat, PingPong, RealTime); else Ease3.GoColorTo(this, Value.GetVector3(), Time, null, Complete.Invoke, Type, Delay, Repeat, PingPong, RealTime); }
public void Pause() { Time.timeScale = (_pause = !_pause) ? 0f : _slow ? .1f : _fast ? 2f : 1f; _pauseStatus.StopAllCoroutines(); Ease3.GoColorTo(_pauseStatus, (_pause ? _colorOn : _colorOff).GetVector3(), _time, null, null, EaseType.SineInOut, 0f, 1, false, true); Ease3.GoScaleTo(_pauseStatus, _scaleTo, _time, null, () => { Ease3.GoScaleTo(_pauseStatus, Vector3.one, _time, null, null, EaseType.BackInOut, 0f, 1, false, true); }, EaseType.BackInOut, 0f, 1, false, true); }
public void Fast() { _slow = false; _slowStatus.color = _colorOff; _pause = false; _pauseStatus.color = _colorOff; Time.timeScale = (_fast = !_fast) ? 2f : 1f; _fastStatus.StopAllCoroutines(); Ease3.GoColorTo(_fastStatus, (_fast ? _colorOn : _colorOff).GetVector3(), _time, null, null, EaseType.SineInOut, 0f, 1, false, true); Ease3.GoScaleTo(_fastStatus, _scaleTo, _time, null, () => { Ease3.GoScaleTo(_fastStatus, Vector3.one, _time, null, null, EaseType.BackInOut, 0f, 1, false, true); }, EaseType.BackInOut, 0f, 1, false, true); }
void Start() { var scale = 2; var camera = Camera.main; if (camera != null) { var fitX = (int)(Screen.width / Henry.sprite.rect.width); var fitY = (int)(Screen.height / Henry.sprite.rect.height); var newScale = Mathf.Min(fitX, fitY) - 2; if (newScale > scale) { scale = newScale; } } StartCoroutine(PlayDelayed()); Ease3.GoScaleTo(Henry, new Vector3(scale, scale, 1f), _timeAnimation, null, null, EaseType.BounceOut, _timeDelay); Ease3.GoRotationTo(Henry, new Vector3(0f, 0f, 180f), _timeAnimation, null, null, EaseType.BounceOut, _timeDelay); Ease3.GoColorTo(this, Color.black.GetVector3(), _timeAnimation, null, Fade, EaseType.BounceOut, _timeDelay); }