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);
    }
Example #2
0
 private void Awake()
 {
     MaxRep    = maxRep;
     text.text = "Rep: " + ((int)Rep).ToString();
     repScript = this;
 }