void decreaseHealth(int healthChange) { npcHealth -= healthChange; //Debug.Log(npcHealth); if (npcHealth <= 0) { npcHealth = 0; npcManagerMasterScript.callNPCDieEvent(); Destroy(gameObject, Random.Range(10, 20)); } checkHealthFraction(); }