void Awake() { b = ball.GetComponent <bounce>(); if (b == null) { b = ball.AddComponent <bounce>(); } RandomWeights(); }
// Use this for initialization void Start() { rb = GetComponent <Rigidbody>(); a = GetComponent <bounce>(); dir = new Vector3(-0.9939408f, -0.0007806213f, -0.1099157f); bc = GetComponent <BoxCollider>(); b = GetComponent <Player_Motor>(); OldSize = bc.size; rs = GetComponent <RainBowSpeed>(); cam = GetComponentInChildren <Camera>(); source = GetComponents <AudioSource>()[1]; BGMSource = GetComponents <AudioSource>()[0]; }