private void Awake() { if (UI_PowerUpImage != null) { UI_PowerUpImage.enabled = false; } inputMan = GameObject.Find("InputManager").GetComponent <InputManagerStatic>(); }
//private bool IsRocketAttached { get { return GetComponentInChildren<SkinnedMeshRenderer>().enabled;}} #endregion void Awake() { //try { gameManager = GameObject.Find("GameManager").GetComponent<GameManager>(); } //catch (Exception) { throw new Exception("Scene must contain a GameManager"); } try { rigidBody = GetComponent <Rigidbody>(); } catch (Exception) { throw new Exception("CarController must be attached to a GameObject with a Rigidbody component."); } try { inputManager = GameObject.Find("InputManager").GetComponent <InputManagerStatic>(); } catch (Exception) { throw new Exception("Scene must contain InputManager called 'InputManager'"); } rigidBody.centerOfMass = centerOfMassOffset; tireSidewaysStiffnessDefault = wheelsAll[0].sidewaysFriction.stiffness; torqueCurveModifier = new AnimationCurve(new Keyframe(0, 1), new Keyframe(maxSpeed, 0.25f)); startingMass = rigidBody.mass; canDrive = true; //for (int i = 0; i < wheelsAll.Length; i++) //{ // wheelsAll[i].suspensionDistance = rideHeight; //} }
private Vector3 rollUp = Vector3.up; // The roll of the camera around the z axis ( generally this will always just be up ) #region Lucia code protected override void Awake() { //if (playerToFollow == "NP") //{ // playerToFollow = null; //} //else base.Awake(); target = playerToFollow; inputManager = GameObject.Find("InputManager").GetComponent <InputManagerStatic>(); //supposed to check for players for the spectate mode, right now it makes the game angry though /*playersInGame = new PlayerData[PlayerManager.playersInScene.Length]; * playersInGame = PlayerManager.playersInScene; * if (playersInGame == null) * { * Debug.Log("playersInGame is null"); * }*/ }
private void Start() { inputManager = GameObject.Find("GameManager").GetComponent <InputManagerStatic>(); }
// Use this for initialization void Start() { panelImage = GetComponent <FadingUI>(); inputManagerStatic = GameObject.Find("InputManager").GetComponent <InputManagerStatic>(); }
private void Awake() { inputManager = GameObject.Find("InputManager").GetComponent <InputManagerStatic>(); }