private void CmdSetLedger(MPlayerData pdata, int _newScore) { _ledgerEntry = new Scoreboard.LedgerEntry() { playerData = pdata, score = _newScore }; }
void RpcSendScoreBomb(Scoreboard.LedgerEntry le) { GameObject sb = (GameObject)Instantiate(scoreBomb, Vector3.one * 3f, Quaternion.identity); sb.GetComponent <ScoreBomb>().le = le; sb.GetComponent <Renderer>().material.color = isServer ? Color.blue : Color.red; NetworkServer.Spawn(sb); }
void RpcRecordScore(Scoreboard.LedgerEntry le) { setLedgerLocal(le); scoreboard.UpdateDisplay(le); DebugHUD.Debugg("record Score: " + le.ToString() + " is cli: " + isClient); player.testGetNewScore(le); }
// //SyncVar hook callback // void OnScored(Scoreboard.LedgerEntry currentLe) { if (isServer) { RpcRecordScore(currentLe); } //CmdSendScoreBomb(currentLe); }
void setLedgerLocal(Scoreboard.LedgerEntry le) { _ledgerEntry.playerData = le.playerData; _ledgerEntry.score = le.score; }
private void debugLE(string s, Scoreboard.LedgerEntry le) { DebugHUD.Debugg(string.Format("{0} : {1} {2}", (isClient ? "CLI" : "SRV"), s, le.ToString())); }
public void testGetNewScore(Scoreboard.LedgerEntry le) { //dbugWithName("set name plate"); setNamePlate(); }