public void End(float duration, GoEaseType easeType = GoEaseType.Linear) { if (_beginTween.state == GoTweenState.Running) { _beginTween.pause(); _beginTween.destroy(); } Go.to(_camera, duration, new GoTweenConfig().floatProp("fieldOfView", _originalValue).setEaseType(easeType)); }
public void Die() { walkingAroundTween.pause(); walkingAroundTween.destroy(); markedForDestruction = true; Go.to(gameObject.transform, .3f, new GoTweenConfig().scale(0f).onComplete(goTween => { Destroy(gameObject); })); }
public void End(float duration, GoEaseType easeType = GoEaseType.Linear) { if (_beginTween.state == GoTweenState.Running) { _beginTween.pause(); _beginTween.destroy(); } Go.to(_radialBlur, duration, new GoTweenConfig().floatProp("BlurStrength", 0f).setEaseType(easeType)); }
public void End(float duration, GoEaseType easeType = GoEaseType.Linear) { if (_beginTween.state == GoTweenState.Running) { _beginTween.pause(); _beginTween.destroy(); } Go.to(_stars, duration, new GoTweenConfig().floatProp("startSpeed", 100f).setEaseType(easeType).onComplete(t => Stop())); }
void OnTriggerEnter(Collider other) { if (other.gameObject.tag != "Sword") { //return; } if (!stabbed) { stabbed = true; MonsterVoice.clip = Resources.Load(Sounds.MonsterHurt) as AudioClip; MonsterVoice.Play(); StopAllCoroutines(); anim.SetBool("SwimmingBool", false); anim.SetBool("RoarBool", true); attackTween.pause(); } }
void Awake() { text = ResolveTextSize (text, lineLenth); afterFetch = ResolveTextSize (afterFetch, lineLenth); _text = text; _originalScale = speechBubble.transform.localScale; speechBubble.enabled = false; textMesh.text = ""; _twnExit = new GoTween (speechBubble.transform, 0.15f, new GoTweenConfig ().scale (_originalScale*0.001f).setEaseType(GoEaseType.ExpoOut).onComplete(OnExitComplete)); speechBubble.transform.localScale = _originalScale * 0.001f; _twnEnter = new GoTween (speechBubble.transform, 0.15f, new GoTweenConfig ().scale (_originalScale).setEaseType(GoEaseType.BackOut).onComplete(OnEnterComplete)); _twnEnter.pause (); _twnExit.pause (); _twnEnter.autoRemoveOnComplete = false; _twnExit.autoRemoveOnComplete = false; Go.addTween (_twnEnter); Go.addTween (_twnExit); }
public void Grow() { //HERE I GROW; if (growTween != null) { growTween.pause(); } finishScale += 0.01f; Vector3 newScale = new Vector3(finishScale, finishScale, transform.localScale.z); var scaleProperty = new ScaleTweenProperty(newScale); tweenConfig = new GoTweenConfig(); //config.setDelay( 1f ); tweenConfig.addTweenProperty(scaleProperty); growTween = new GoTween(transform, 1f, tweenConfig); Go.addTween(growTween); }