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); }
/* * 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>(); }
// Use this for initialization void Start() { scores = sceneManager.GetComponent <Scores>(); ballStart = sceneManager.GetComponent <BallStart>(); a = (player == 1) ? 500 : -500; }
void Awake() { ballStart = GetComponentInChildren <BallStart>(); puzzleCamera = GetComponentInChildren <Cinemachine.CinemachineVirtualCamera>(); }
// Use this for initialization void Start() { ispaused = false; score = this.GetComponent <Scores>(); starting = this.GetComponent <BallStart>(); }