コード例 #1
0
ファイル: PlayerHealth.cs プロジェクト: MrPixeIz/Multiplayer
    public void CmdDealDamage(GameObject from, int damage)
    {
        TeamManager fromTeanManager = from.GetComponent <TeamManager>();

        if (fromTeanManager != null)
        {
            if (scoreDisplayer != null)
            {
                if (fromTeanManager.GetTeam() != teamManager.GetTeam())
                {
                    scoreDisplayer.RpcAddKill(fromTeanManager.GetTeam());
                }
            }
        }
        playerController.RpcDie();
    }