Exemple #1
0
 private void Start()
 {
     rb                    = GetComponent <Rigidbody>();
     distscript            = FindObjectOfType <DistanceFromGoal>();
     controller            = FindObjectOfType <ControllerScript>();
     rb.maxAngularVelocity = 1000f;
 }
 // Use this for initialization
 void Start()
 {
     distscript     = FindObjectOfType <DistanceFromGoal>();
     scoretxt       = GameObject.Find("ScoreNum").GetComponent <Text>();
     shotvaluetxt   = GameObject.Find("ShotValueNum").GetComponent <Text>();
     goalParticles  = GameObject.Find("goalParticles").GetComponent <ParticleSystem>();
     basketballHoop = GameObject.FindGameObjectWithTag("hoop");
 }