예제 #1
0
    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);
    }
예제 #2
0
 public void SetInactive()
 {
     if (gameObject.activeSelf)
     {
         if (tweenOut == null)
         {
             tweenOut = GetComponentInChildren <TweenOut>();
         }
         tweenOut.StartTween(0.5f);
     }
 }
예제 #3
0
    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);
        }
    }
예제 #4
0
    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);
                }
            }
        }
    }
예제 #5
0
    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);
        }
    }
예제 #6
0
 public void EnableHearth()
 {
     fadeIn.StartTween(0.8f);
 }
예제 #7
0
 private void OnEnable()
 {
     tweenIn.StartTween(0.9f);
 }