public static void PushStateToDirectory(int sourceID, int tickID, SyncTickData data, int channelID) { PirateRPC.PirateRPC.SendInvocation(ns, u => { LocalDB.PushData(tickID, sourceID, data); LocalDB.TryDistributeData(tickID); }); }
static Action <Stream> GetCallbackForSuccessfulPlayerJoin(int id, int roundLen) { return(k => { SyncTickData.SetClientID(id); NetDemo.ClientSetRoundLength(roundLen); hasClientID = true; LongEventHandler.QueueLongEvent(CooperateRimming.GenerateWorld, "Waiting to make a world", true, e => { NetDemo.Log(e.ToString()); }); }); }
public static void PushData(int tickID, int playerID, SyncTickData sd) { lock (data) { if (!data.ContainsKey(tickID)) { data.Add(tickID, new SyncTickData[NetDemo.desiredPlayerCount]); } if (data[tickID][playerID] == null) { log("player state : " + GetStringFor(tickID, playerID)); data[tickID][playerID] = sd; } } }