Ejemplo n.º 1
0
    public void SpawnObject(GameObject spawningObject)
    {
        Debug.Log("Spawning Boulder and adding to score");
        theScore.AddToScore(1);
        BallScript   thisBallScript = spawningObject.GetComponent <BallScript>();
        ScaleShifter scaleShift     = GameObject.FindObjectOfType <ScaleShifter>().GetComponent <ScaleShifter>();

        scaleShift.ShiftObjectScale(spawningObject);

        int i = Random.Range(0, objectSpawner.Length);

        spawningObject.transform.position = objectSpawner[i].transform.position;
        spawningObject.SetActive(true);

        thisBallScript.LaunchBall(-1f);
    }
 void InitilizePrivateVariables()
 {
     shiftingMechanisim = GameObject.FindObjectOfType <ScaleShifter>();
 }