void Start() { gamePlayer = FindObjectOfType <L3_PlayerC> (); car = FindObjectOfType <CarScript> (); saw = FindObjectOfType <SawScript> (); weight = FindObjectOfType <WeigihtScript> (); coinText.text = "Coins: " + coins3; }
// Update is called once per frame void Update() { if (shoot == true) { if (time < Time.time) { SawScript saw = Instantiate(sawPrefab, transform.position, transform.rotation) as SawScript; saw.dir = dir2; if (fromRight == true) { saw.transform.rotation = Quaternion.Euler(0, 0, 180); } else { saw.transform.rotation = Quaternion.Euler(0, 0, 0); } time = Time.time + sawDelay; } } }