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; }
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!"); } }
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; }
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!"); }