// Update is called once per frame void Update() { playerController = GetComponent <CharacterController> (); playerTransform = GetComponent <Transform> (); playerMeshRender = GetComponent <MeshRenderer> (); playerAudio = GetComponent <AudioSource> (); time = GameObject.FindGameObjectWithTag("sceneManager").GetComponent <script_gameTimer>(); change_player_state(); Shoot(); if (script_sceneManager.level_restart) { spawnPos = startPos; StartCoroutine(MarioRespawn(0.0f)); lives = 3; coins = 0; bigCoins = 0; totalCoinCollected = 0; time.setTime = true; } }
void Start() { playerProperties = player.GetComponent <script_playerProperties>(); time = GetComponent <script_gameTimer>(); }