// Use this for initialization void Start() { m_text = gameObject.GetComponent<Text>(); if (isTop) { m_car = Main.S.carTop.GetComponent<ArcadeVehicle>(); } else { m_car = Main.S.carBottom.GetComponent<ArcadeVehicle>(); } }
/// <summary> /// Set flags for the update method to handle shrinking and growing /// </summary> /// <returns>The powerup.</returns> /// <param name="vehicle">Vehicle to boost.</param> IEnumerator boostPowerup(ArcadeVehicle vehicle) { isShrinking = true; m_arcadeVehicle.accel += boostAccel; m_arcadeVehicle.accelPointRel.z = 1; yield return new WaitForSeconds(5f); m_arcadeVehicle.accelPointRel.z = 0; isNormalizingUp = true; m_arcadeVehicle.accel -= boostAccel; }
void Awake() { m_arcadeVehicle = gameObject.GetComponentInParent<ArcadeVehicle>(); m_carstate = gameObject.GetComponentInParent<CarState>(); m_transform = gameObject.GetComponentInParent<Transform>(); }
IEnumerator endOilSlickCause(ArcadeVehicle vehicle) { yield return new WaitForSeconds(5); // undo oil slick effect vehicle.horizontalFriction = .5f; }
void Awake() { m_car = carObject.GetComponent<ArcadeVehicle>(); }
void Awake() { m_car = GetComponent<ArcadeVehicle>(); m_audioSource = GetComponent<AudioSource>(); }
// Use this for initialization void Start() { m_arcadeVehicle = gameObject.GetComponentInParent<ArcadeVehicle>(); m_carstate = gameObject.GetComponentInParent<CarState>(); m_transform = gameObject.GetComponentInParent<Transform>(); m_topInCollisionZone = false; m_bottomInCollisionZone = false; }