RocketJumper() { if (Engine.EditorHint) { return; } Self = this; }
public void AttachPart(GameObject carObj) { GameObject part = Instantiate(rocketJumper, transform.position, Quaternion.identity, carObj.transform); RocketJumper jumper = part.GetComponent <RocketJumper>(); RocketBusterControls controls = carObj.GetComponent <RocketBusterControls>(); if (controls == null) { controls = carObj.AddComponent <RocketBusterControls>(); } controls.AddBuster(jumper); }
public void AddBuster(RocketJumper jumper) { jumpers.Add(jumper); }