public void KDChangedCallback() { KDChanged newEvent = KDChanged.Create(); newEvent.Entity = entity; newEvent.Send(); }
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!"); } }