Example #1
0
 void Start()
 {
     g  = GameObject.FindGameObjectWithTag("GameController").GetComponent <Gravity>();
     rb = GetComponent <Rigidbody2D>();
     g.AddBody(rb);
 }
Example #2
0
 void Start()
 {
     g = GameObject.FindGameObjectWithTag("GameController").GetComponent<Gravity>();
     rb = GetComponent<Rigidbody2D>();
     g.AddBody(rb);
 }