void ThrowRock() { RockBeingTossed.transform.parent = null; Rock_AI RockAI = RockBeingTossed.GetComponent <Rock_AI>(); RockAI.LaunchRock(); }
void InstantiateRock() { RockBeingTossed = Instantiate(Rock, RockToInstantiateTo.transform.position, RockToInstantiateTo.transform.rotation, RockToInstantiateTo); RockBeingTossed.transform.position = new Vector3(0, 0, 0); Rock_AI RockAI = RockBeingTossed.GetComponent <Rock_AI>(); RockAI.ParabolaRoot = ParabolaTransform.gameObject; RB = RockBeingTossed.GetComponent <Rigidbody>(); }