Ejemplo n.º 1
0
	void Start() {
		vertExtent = Camera.main.orthographicSize;
		horzExtent = vertExtent * Screen.width / Screen.height;
		rigid = GetComponent<Rigidbody>();
		if (rigid == null) print("Error: No Rigidbody on particle");
		gm = GetComponent<GravityMotion>();
		if (gm == null) print("Error: No GravityMotion on particle");
		rigid.velocity = Random.onUnitSphere;
	}
Ejemplo n.º 2
0
 void Start()
 {
     gm = GetComponent <GravityMotion>();
     if (gm == null)
     {
         print("Error: No GravityMotion on an object with a TrajectoryForecast!");
     }
     lr = GetComponent <LineRenderer>();
     if (gm == null)
     {
         print("Error: No LineRenderer on an object with a TrajectoryForecast!");
     }
 }
Ejemplo n.º 3
0
 void Start()
 {
     vertExtent = Camera.main.orthographicSize;
     horzExtent = vertExtent * Screen.width / Screen.height;
     rigid      = GetComponent <Rigidbody>();
     if (rigid == null)
     {
         print("Error: No Rigidbody on particle");
     }
     gm = GetComponent <GravityMotion>();
     if (gm == null)
     {
         print("Error: No GravityMotion on particle");
     }
     rigid.velocity = Random.onUnitSphere;
 }
Ejemplo n.º 4
0
	void Start() {
		gm = GetComponent<GravityMotion>();
		if (gm == null) print("Error: No GravityMotion on an object with a TrajectoryForecast!");
		lr = GetComponent<LineRenderer>();
		if (gm == null) print("Error: No LineRenderer on an object with a TrajectoryForecast!");
	}