public override void OnThisThingDead()
    {
        if (NetID != -1)
        {
            RemoveCharacterData();
        }

        CharacterItemDroper itemdrop = this.GetComponent <CharacterItemDroper>();

        if (itemdrop)
        {
            itemdrop.DropItem();
        }

        if (isServer)
        {
            ItemDropAfterDead dropafterdead = this.GetComponent <ItemDropAfterDead>();
            if (dropafterdead)
            {
                dropafterdead.DropItem();
            }
        }

        base.OnThisThingDead();
    }
Exemple #2
0
    public override void OnThisThingDead()
    {
        if (NetID != -1)
        {
            RemoveCharacterData();
        }

        if (UnitZ.NetworkGameplay.scoreManager)
        {
            UnitZ.NetworkGameplay.scoreManager.AddDead(1, NetID);
            if (NetID != LastHitByID)
            {
                UnitZ.NetworkGameplay.scoreManager.AddScore(1, LastHitByID);
            }
        }


        CharacterItemDroper itemdrop = this.GetComponent <CharacterItemDroper> ();

        if (itemdrop)
        {
            itemdrop.DropItem();
        }
        base.OnThisThingDead();
    }