void Death() { if (!gameIsRunning) { return; } gameIsRunning = false; // Set the death flag so this function won't be called again. isDead = true; // Turn off any remaining shooting effects. playerShooting.DisableEffects(); // Tell the animator that the player is dead. anim.SetTrigger("Die"); // Set the audiosource to play the death clip and play it (this will stop the hurt sound from playing). playerAudio.clip = deathClip; playerAudio.Play(); AkSoundEngine.PostEvent("sfx_player_death", GameObject.Find("WwiseGlobal")); AkSoundEngine.PostEvent("mx_game_lose", GameObject.Find("WwiseGlobal")); // Turn off the movement and shooting scripts. playerMovement.enabled = false; playerShooting.enabled = false; restartQueued = true; waitingTime = 0.0f; timeUntilRestart = loseScreenWaitTime; }
void Death() { // Set the death flag so this function won't be called again. isDead = true; // Turn off any remaining shooting effects. playerShooting.DisableEffects(); // Tell the animator that the player is dead. anim.SetTrigger("Die"); // Set the audiosource to play the death clip and play it (this will stop the hurt sound from playing). playerAudio.clip = deathClip; playerAudio.Play(); // Turn off the movement and shooting scripts. playerMovement.enabled = false; playerShooting.enabled = false; Analytics.CustomEvent("gameOver", new Dictionary <string, object> { { "potions", totalPotions }, { "coins", totalCoins }, { "activeWeapon", weaponID } }); }
void Death() { // Set the death flag so this function won't be called again. isDead = true; // Turn off any remaining shooting effects. playerShooting.DisableEffects(); // Tell the animator that the player is dead. anim.SetTrigger("Die"); GetComponent <CapsuleCollider>().isTrigger = true; // Set the audiosource to play the death clip and play it (this will stop the hurt sound from playing). playerAudio.clip = deathClip; playerAudio.Play(); // Turn off the movement and shooting scripts. playerMovement.enabled = false; playerShooting.enabled = false; if (myPhotonView.IsMine) { Instantiate(canvasRespawn); } StartCoroutine(DeathEffect(2f)); }
void Death() { isDead = true; playerShooting.DisableEffects(); anim.SetTrigger("Die"); playerAudio.clip = deathClip; playerAudio.Play(); playerMovement.enabled = false; playerShooting.enabled = false; }
void Death() { audio.player_die(); // Set the death flag so this function won't be called again. // Turn off any remaining shooting effects. playerShooting.DisableEffects(); // Tell the animator that the player is dead. anim.SetTrigger("Die"); // Turn off the movement and shooting scripts. playerController.enabled = false; playerShooting.enabled = false; }
public void Death() { // Turn off any remaining shooting effects. playerShooting.DisableEffects(); // Tell the animator that the player is dead. anim.SetTrigger("Die"); // Set the audiosource to play the death clip and play it (this will stop the hurt sound from playing). playerAudio.clip = deathClip; playerAudio.Play(); // Turn off the movement and shooting scripts. playerMovement.enabled = false; playerShooting.enabled = false; }
void Death() { isDead = true; //slekkur á möguleikanum að skjóta ef "Death" gerist playerShooting.DisableEffects(); //kallar í animatorinn anim.SetTrigger("Die"); playerAudio.clip = deathClip; playerAudio.Play(); // slekkur á shooting og movement playerMovement.enabled = false; playerShooting.enabled = false; }
void Death() { isDead = true; // Turn off any remaining shooting effects. playerShooting.DisableEffects(); // trigger animasi die anim.SetTrigger("Die"); // memainkan suara ketika mati playerAudio.clip = deathClip; playerAudio.Play(); // mematikan script pergerakan playerMovement.enabled = false; playerShooting.enabled = false; }
void Death() { // si esta muerto esta funcion no se llama de nuevo isDead = true; // desactivar cualquier efecto de sonido. playerShooting.DisableEffects(); // mostrar que ha muerto. anim.SetTrigger("Die"); // reproduce el sonido de muerte y desactiva el de herida. playerAudio.clip = deathClip; playerAudio.Play(); // desactiva movimientos y disparos playerMovement.enabled = false; playerShooting.enabled = false; }
void Death() { // Set the death flag so this function won't be called again. isDead = true; // Turn off any remaining shooting effects. playerShooting.DisableEffects(); // Tell the animator that the player is dead. // Set the audiosource to play the death clip and play it (this will stop the hurt sound from playing). playerAudio.clip = deathClip; playerAudio.Play(); // Turn off the movement and shooting scripts. playerMovement.enabled = false; playerShooting.enabled = false; shootButton.gameObject.SetActive(false); restartButton.gameObject.SetActive(true); }
void Death() { // Set the death flag so this function won't be called again. isDead = true; // Turn off any remaining shooting effects. playerShooting.DisableEffects(); // Tell the animator that the player is dead. anim.SetTrigger("Die"); // Set the audiosource to play the death clip and play it (this will stop the hurt sound from playing). playerAudio.clip = deathClip; playerAudio.Play(); // Turn off the movement and shooting scripts. playerMovement.enabled = false; playerShooting.enabled = false; Invoke("RestartLevel", timeToRestart); }
public void Death() { // Set the death flag so this function won't be called again. isDead = true; // Turn off any remaining shooting effects. playerShooting.DisableEffects(); // Tell the animator that the player is dead. anim.SetTrigger("Die"); // Set the audiosource to play the death clip and play it (this will stop the hurt sound from playing). playerAudio.clip = deathClip; playerAudio.Play(); // Turn off the movement and shooting scripts. playerMovement.enabled = false; playerShooting.enabled = false; // Send game event "Player Died" to the server tcp.sendData("Player Died"); }
void Death() { // Set the death flag so this function won't be called again. isDead = true; // Turn off any remaining shooting effects. playerShooting.DisableEffects(); // Tell the animator that the player is dead. anim.SetTrigger("Die"); // Set the audiosource to play the death clip and play it (this will stop the hurt sound from playing). playerAudio.clip = deathClip; playerAudio.Play(); // Turn off the movement and shooting scripts. playerMovement.enabled = false; playerShooting.enabled = false; // Update db with information from this round stats.UpdatePlayerStatsOnDeath(spawnTime, transform.position, playerShooting.numShots, ScoreManager.score); //@@ stats.RecordStatsInDatabase(); //@@ }
void Death() { // Set the death flag so this function won't be called again. isDead = true; // Turn off any remaining shooting effects. playerShooting.DisableEffects(); // Tell the animator that the player is dead. anim.SetTrigger("Die"); // Set the audiosource to play the death clip and play it (this will stop the hurt sound from playing). playerAudio.clip = deathClip; playerAudio.Play(); // Turn off the movement and shooting scripts. playerMovement.enabled = false; playerShooting.enabled = false; // Debug.Log("Tracking Player Death"); // RudderEvent rudderEvent = new RudderEventBuilder() // .SetEventName("PlayerHealth_Death") // .Build(); // RudderProperty rudderProperty = new RudderProperty(); // rudderProperty.AddProperty("category", "Death"); // rudderProperty.AddProperty("transform_position", transform.position.ToString()); // rudderProperty.AddProperty("rl_message_id", rudderEvent.rl_message.rl_message_id); // rudderEvent.SetProperties(rudderProperty); // CompleteProject.PlayerMovement.rudderInstance.Track(rudderEvent); // Dictionary<string, object> demoOptions = new Dictionary<string, object>() { // {"category" , "Death" }, // {"transform_position" , transform.position.ToString()}, // {"rl_message_id" , rudderEvent.rl_message.rl_message_id} // }; // Amplitude.Instance.logEvent("PlayerHealth_Death Direct", demoOptions); }