コード例 #1
0
        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();
        }
コード例 #2
0
 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);
 }