private void Start() { cm = CheckpointManager.instance; sc = StatCounter.instance; rb = GetComponent <Rigidbody2D>(); rb.centerOfMass = Vector2.zero; fuel = GetComponent <ShipFuel>(); health = GetComponent <ShipHealth>(); goText.enabled = false; paused = false; pausedText.gameObject.SetActive(paused); StartCoroutine(ShowText()); }
void Start() { // Get the rigidbody component's reference rb = GetComponent <Rigidbody>(); // Get the fuel component's reference shipFuel = GetComponent <ShipFuel>(); // Get the Audio Source jetEngineSound = GetComponent <AudioSource>(); // Set the ship health shipHealth = maxShipHealth; propulsionInitialPosition = shipPropulsionEffect.transform.localPosition; fullThrottlePosition = new Vector3(0f, -1.3f, 0f); volume = minMaxVolume.x; jetEngineSound.volume = volume; }
void Start() { shipFuel = GetComponent <ShipFuel>(); gaugeArrow.rectTransform.rotation = Quaternion.Euler(0f, 0f, -60f); }