public void Install(PMonitor Monitor)
 {
     TriggerList.ForEach((PTrigger Trigger) => {
         Monitor.AddTrigger(Trigger);
     });
     Monitor.Game.PlayerList.ForEach((PPlayer Player) => {
         PPlayer TargetPlayer = Player;
         MultiPlayerTriggerList.ForEach((Converter <PPlayer, PTrigger> TriggerTemplate) => {
             Monitor.AddTrigger(TriggerTemplate(TargetPlayer));
         });
     });
     PLogger.Log("  规则装载完毕:" + Name);
 }
Esempio n. 2
0
 /// <summary>
 /// 新建一个游戏
 /// </summary>
 /// <param name="_Map">原型地图(新建的游戏采用其复制品)</param>
 /// <param name="_GameMode">游戏模式</param>
 public PGame(PMap _Map, PMode _GameMode) : base(_Map, _GameMode)
 {
     Room = new PRoom(GameMode);
     PLogger.Log("新建游戏,模式:" + GameMode.Name);
     this._Map = _Map;
     GameMode.Open(this);
     Logic       = new PGameLogic(this);
     Monitor     = new PMonitor(this);
     TagManager  = new PTagManager();
     CardManager = new PCardManager(this);
     GameMode.Install(this);
     StartGameFlag        = false;
     EndGameFlag          = false;
     ReadyToStartGameFlag = true;
     PreparedList         = new List <bool>();
 }