Esempio n. 1
0
    private IEnumerator IncreseXYScale(BallStart ball)
    {
        var newScale = ball.transform.localScale;

        newScale.x *= 2;
        newScale.y *= 2;

        ball.transform.localScale = newScale;

        yield return(new WaitForSeconds(BonusDuration));

        ball.transform.localScale = new Vector3(1f, 1f, 0f);
    }
Esempio n. 2
0
    /*
     * Vector 1
     *  position : if(Distance > 3) => (ballPos + 1.5f * rb.velocity.normalized) else => (hitPos - ballPos)
     *  rotation : (0f, 0f, )
     *  scale : (Math.Min(3f, hitPoint), 0.1f, 1f)
     * Vector 2
     * position
     * rotation
     * scale
     */


    private IEnumerator GetRefs()
    {
        float timeElapsed = 0f;

        while (timeElapsed < 0.1f)
        {
            timeElapsed += Time.deltaTime;

            yield return(null);
        }

        audioManager  = FindObjectOfType <AudioManager>();
        targetManager = FindObjectOfType <TargetManager>();
        ballStart     = GetComponent <BallStart>();
    }
Esempio n. 3
0
 // Use this for initialization
 void Start()
 {
     scores    = sceneManager.GetComponent <Scores>();
     ballStart = sceneManager.GetComponent <BallStart>();
     a         = (player == 1) ? 500 : -500;
 }
Esempio n. 4
0
 void Awake()
 {
     ballStart    = GetComponentInChildren <BallStart>();
     puzzleCamera = GetComponentInChildren <Cinemachine.CinemachineVirtualCamera>();
 }
Esempio n. 5
0
 // Use this for initialization
 void Start()
 {
     ispaused = false;
     score    = this.GetComponent <Scores>();
     starting = this.GetComponent <BallStart>();
 }