コード例 #1
0
    public void OnPlayerKilled(Photon.Realtime.Player attacker, string dead, string source)
    {
        //Debug.Log("Die from " + source);
        this.isAlive           = false;
        ingameui.KillFeed.text = attacker.NickName + " kill " + dead + " with " + source;
        if (iam.IsMine && GameManager.instance.IsAlive)
        {
            if (attacker.NickName != PhotonNetwork.LocalPlayer.NickName && source != "Fall out of map")
            {
                attacker.AddKill(1);
                //Debug.Log(attacker.NickName + " Has " + attacker.GetKills() + " Kills");
            }
            PhotonNetwork.LocalPlayer.AddDeath(1);
            GameManager.instance.IsAlive = false;
            InGameUI.instance.SetDeathpanel(true);
            //ragdol.gameObject.SetActive(false);


            Invoke("PlayerRespawn", GameManager.instance.RespawnTime);
        }
        Dead();
    }