예제 #1
0
    public void Die(GameObject go)
    {
        PlayerInfo pi = go.GetComponent <PlayerInfo>();

        if (pi.Player.IsLocal)
        {
            if (pi.RoleType == RoleType.Hero)
            {
                knapsack.Clear();
                SetInteractive(false);
                foreach (GameObject head in headDict.Values)
                {
                    Destroy(head);
                }
            }
            else
            {
                Destroy(headDict[pi.InstanceId]);
            }
        }
        if (pi.Player.CampType == CampType.Fish)
        {
            deadCount++;
        }
    }