示例#1
0
    public void KDChangedCallback()
    {
        KDChanged newEvent = KDChanged.Create();

        newEvent.Entity = entity;
        newEvent.Send();
    }
示例#2
0
    public override void OnEvent(KDChanged evnt)
    {
        foreach (Health player in NetworkCallbacks.AllPlayers)
        {
            PlayerInfo playerInfo = players[player.entity];
            playerInfo.SetPlayerNameText(player.state.PlayerName);
            playerInfo.SetPlayerKillsText(player.state.Kills.ToString());
            playerInfo.SetPlayerDeathsText(player.state.Deaths.ToString());

            Debug.Log(player.state.PlayerName + " has now " + player.state.Kills.ToString() + " kills!");
        }
    }