public void Start() { log.DebugFormat("TurnManager.Start called for game '{0}'.", pluginHost.GameId); pluginHost.BroadcastEvent(new List <int> { CurrentActor.ActorNr }, 0, (int)Event.StartTurn, null, 0); timer = pluginHost.CreateOneTimeTimer(() => NextTurn(), turnDuration); OnPlayerChanged(); }
public static void RemoveActor(this IPluginHost pluginHost, int actorNr, byte reasonCode, string reason) { object[] eventData = { reasonCode, reason }; pluginHost.RaiseEvent(RemoveActorEventCode, eventData, new List <int> { actorNr }); pluginHost.CreateOneTimeTimer(() => pluginHost.RemoveActor(actorNr, reasonCode, reason), RemoveActorTimerDelay); }