Beispiel #1
0
 private void CmdSetLedger(MPlayerData pdata, int _newScore)
 {
     _ledgerEntry = new Scoreboard.LedgerEntry()
     {
         playerData = pdata,
         score      = _newScore
     };
 }
Beispiel #2
0
    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);
    }
Beispiel #3
0
    void RpcRecordScore(Scoreboard.LedgerEntry le)
    {
        setLedgerLocal(le);
        scoreboard.UpdateDisplay(le);

        DebugHUD.Debugg("record Score: " + le.ToString() + " is cli: " + isClient);
        player.testGetNewScore(le);
    }
Beispiel #4
0
 //
 //SyncVar hook callback
 //
 void OnScored(Scoreboard.LedgerEntry currentLe)
 {
     if (isServer)
     {
         RpcRecordScore(currentLe);
     }
     //CmdSendScoreBomb(currentLe);
 }
Beispiel #5
0
 void setLedgerLocal(Scoreboard.LedgerEntry le)
 {
     _ledgerEntry.playerData = le.playerData;
     _ledgerEntry.score      = le.score;
 }
Beispiel #6
0
 private void debugLE(string s, Scoreboard.LedgerEntry le)
 {
     DebugHUD.Debugg(string.Format("{0} : {1} {2}", (isClient ? "CLI" : "SRV"), s, le.ToString()));
 }
Beispiel #7
0
 public void testGetNewScore(Scoreboard.LedgerEntry le)
 {
     //dbugWithName("set name plate");
     setNamePlate();
 }