public override void DidPress(Vector3 dir) { if (!_lastShotObject) { base.DidPress(dir); } else { JComponent.Remove(_lastShotObject); } }
public static void Remove(GameObject obj) { JComponent component = obj.GetComponent <JComponent>(); if (component) { component.Remove(); } else { Destroy(obj); } }