// Start is called before the first frame update void Start() { name = transform.parent.name; ballDur = GetComponent <BallDurability>(); ballCollision = GetComponent <BallCollision>(); nameplateDisplay = GetComponent <NameplateDisplay>(); }
private void Start() { rb = GetComponent <Rigidbody>(); ballDur = GetComponent <BallDurability>(); ballPhysics = GetComponent <BallPhysics>(); nameplate = GetComponent <NameplateDisplay>(); //Initialise ballConfig values }
// Start is called before the first frame update void Start() { child = transform.GetChild(0); rotation = transform.parent.GetChild(1); rb = GetComponent <Rigidbody>(); ballDur = GetComponent <BallDurability>(); cfg = GetComponent <BallCollision>().ballConfig; childPosition = child.localPosition; rb.centerOfMass = Vector3.zero; layer = LayerMask.NameToLayer("Map"); circleSpeed = Random.Range(cfg.minCircleSpeed, cfg.maxCircleSpeed); dir = Random.Range(0f, 360f); if (Random.value < 0.5f) { circleSpeed *= -1; } NewCircular(); }