public void OnDeath() { DisableStuff(); DropItems(); Repp.changeRep(scriptebleHealth.repBoast); switch (GetComponent <AIController>().behavor) { case AIController.Behavor.Pasive: StatBlock.merchantsKilled++; break; case AIController.Behavor.Defensive: StatBlock.piratesKilled++; break; case AIController.Behavor.Offecive: StatBlock.navyKilled++; break; default: break; } Destroy(gameObject, GetComponent <AudioSource>().clip.length); }
private void Awake() { MaxRep = maxRep; text.text = "Rep: " + ((int)Rep).ToString(); repScript = this; }