예제 #1
0
 protected virtual void Death()
 {
     if (curhealth <= 0)
     {
         ScoreTable.ChangeScore(ScoreTable.currentPlayer, "score", price);
         Destroy(Instantiate(ragDoll, transform.position, transform.rotation), 20f);
         Destroy(Instantiate(enemyDeathSound, transform.position, transform.rotation), instantiateDuration);
         Destroy(Instantiate(enemyBloodSpill, transform.position, enemyBloodSpill.transform.rotation), instantiateDuration);
         Destroy(gameObject);
         FindObjectOfType <CharacterStats>().UpdateXp(Mathf.RoundToInt(xpReward));
     }
 }