Beispiel #1
0
 public Selector(bool mirrorMode = false)
 {
     menuSelect_soundEffect = Global.content.Load <SoundEffect>("SE_Menu5");
     menuDecide_soundEffect = Global.content.Load <SoundEffect>("SE_Menu3");
     cursor          = new Point(-1, -1);
     topEffectLayer  = (EffectLayer)Global.world.GetLayer("TopEffectLayer");
     matrices        = new Dictionary <string, ISelectable[, ]>();
     nameStack       = new Stack <string>();
     cursorStack     = new Stack <Point>();
     mode            = SelectMode.One;
     allGroup        = new SelectableGroup();
     this.mirrorMode = mirrorMode;
 }
Beispiel #2
0
 private void SetRowGroups()
 {
     rowGroups = new SelectableGroup[height];
     for (int row = 0; row < height; row++)
     {
         rowGroups[row] = new SelectableGroup();
         for (int col = 0; col < width; col++)
         {
             if (!constraint(row, col) || matrices[matrixName][row, col] == null)
             {
                 continue;
             }
             rowGroups[row].items.Add(matrices[matrixName][row, col]);
         }
         if (rowGroups[row].items.Count == 0)
         {
             rowGroups[row] = null;
         }
     }
 }