public override void Init() { GameObject goPlayer = this.gameObject; InputManager = goPlayer.AddComponent <HotrodAIInput>(); HotrodAIInput AI = (HotrodAIInput)InputManager; Gps = new GPS(goPlayer); AI.Gps = Gps; EngineAudioSource.spatialBlend = 1f; //so cant hear it when its a long way off }
public override void Init() { Transform trPlayer = goCar.transform.parent; GameObject goPlayer = trPlayer.gameObject; InputManager = goPlayer.AddComponent <HotrodAIInput>(); HotrodAIInput AI = (HotrodAIInput)InputManager; Rigidbody rb = goPlayer.GetComponent <Rigidbody>(); Gps = new GPS(goPlayer); AI.Gps = Gps; EngineAudioSource.spatialBlend = 1f; //so cant hear it when its a long way off }