// Use this for initialization void Awake() { balls = new List <GameObject>(); ballTypes = new GameObject[] { ball, ballBounce, ballCurve, ballWater, ballElectricity, ballVampiric }; ballsToSpawn = new List <int>[] { new List <int> { }, new List <int> { }, new List <int> { } }; ballSpawns = new float[][] { new float[] { 0, -1.78f, 1.78f }, new float[] { -1.5f, 0, -3f, 1.5f, -4.5f } }; nextBallSpawn = 0; titleScreenLive = false; warmupLive = false; gameLive = false; lightManager = lights.GetComponent <LightManager>(); scoreboardManager = scoreBoard.GetComponent <ScoreboardManager>(); spotLightManager = spotLight.GetComponent <SpotlightManager>(); titleScreenManager = titleScreen.GetComponent <TitleScreenManager>(); playerManager1 = player1.GetComponent <PlayerManager>(); playerManager2 = player2.GetComponent <PlayerManager>(); GenerateBallsToSpawn(0, 0); playerManager1.SetBoundaries(team1Boundaries); playerManager2.SetBoundaries(team2Boundaries); }
// Use this for initialization void Awake() { spotman = GameObject.FindObjectOfType <SpotlightManager>(); hinge = GetComponent <HingeJoint>(); JointSpring hingeSpring = hinge.spring; hingeSpring.spring = 10; hingeSpring.damper = 3; hingeSpring.targetPosition = 20; hinge.spring = hingeSpring; hinge.useSpring = true; }