Exemple #1
0
    // Use this for initialization
    public override void Death(bool gibbed)
    {
        if (CustomNetworkManager.Instance._isServer)
        {
            PlayerNetworkActions pNet = GetComponent <PlayerNetworkActions>();
            pNet.RpcSpawnGhost();

            PlayerMove pM = GetComponent <PlayerMove>();
            pM.isGhost    = true;
            pM.allowInput = true;
            if (lastDamager != gameObject.name)
            {
                PlayerList.Instance.UpdateKillScore(lastDamager);
                pNet.CmdSendAllertMessage("<color=red><b>" + lastDamager + "</b> has killed <b>" + gameObject.name + "</b></color>", true);         //killfeed
            }
            else
            {
                pNet.CmdSendAllertMessage("<color=red><b>" + gameObject.name + " commited suicide</b></color>", true);             //killfeed
            }
        }
        mobStat = MobConsciousStat.DEAD;
        base.Death(gibbed);
    }