public void SetFeedback(string text, Color textColor, Vector3 startPosition, Vector3 endPos) { feedbackText.text = text; feedbackText.color = textColor; transform.position = startPosition + new Vector3(0, 0, -0.9f); endPos.z = transform.position.z; StartCoroutine(TweenAnimation(endPos)); scaleTween.StartTween(0.4f); }
public void SetInactive() { if (gameObject.activeSelf) { if (tweenOut == null) { tweenOut = GetComponentInChildren <TweenOut>(); } tweenOut.StartTween(0.5f); } }
public void SetPlayButton(bool _value) { playButIn.gameObject.SetActive(true); if (_value) { playButIn.enabled = true; playButOut.enabled = false; playButIn.StartTween(0.4f); } else { playButIn.enabled = false; playButOut.enabled = true; playButOut.StartTween(0.6f); } }
private void OnCollisionEnter2D(Collision2D collision) { BallBehaviour bb = collision.gameObject.GetComponent <BallBehaviour>(); if (bb != null) { hitWiggle.StartTween(0.2f); if (bb.GetBallPower == BallPower.None) //Only do this to balls that are not special { if (powerUpQueue.Count > 0) { powerUpQueue.Dequeue().ApplyPowerUp(bb); } } } }
private void OnCollisionEnter2D(Collision2D collision) { BricksAbstract ab = collision.gameObject.GetComponent <BricksAbstract>(); if (ab != null) { ab.HitBrick(ballPower); FeedbackController.SP.GetText(ab); MatchManager.SP.AddScore(ab.GetScore); hitWiggle.StartTween(0.2f); return; } BorderBehaviour bb = collision.gameObject.GetComponent <BorderBehaviour>(); if (bb != null) { BounceOff(collision.contacts[0].point); } }
public void EnableHearth() { fadeIn.StartTween(0.8f); }
private void OnEnable() { tweenIn.StartTween(0.9f); }