Пример #1
0
 public YesNoPanel(Game game, CompoundGameComponent parent, int xSource, int ySource, int width, int height, int xDestination, int yDestination, string message)
     : base(game, xSource, ySource, width, height, xDestination, yDestination)
 {
     this.msgStr = message;
     this.parent = parent;
     LoadContent();
 }
Пример #2
0
 public SettingsMenuRoot(Game game, CompoundGameComponent parent, int xSource, int ySource, int width, int height, int xDestination, int yDestination, string message)
     : base(game, xSource, ySource, width, height, xDestination, yDestination, null, 40)
 {
     this.parent = parent;
     this.msgStr = message;
     LoadContent();
 }
Пример #3
0
 public PanelDynamic(Game game, CompoundGameComponent parent, string sideHandleFilename, string completePaneFilename, int height)
     : base(game, parent)
 {
     this.height               = height;
     this.sideHandleFileName   = sideHandleFilename;
     this.completePaneFilename = completePaneFilename;
     LoadContent();
 }
Пример #4
0
 public TimersPanel(Game game, CompoundGameComponent parent, int xSource, int ySource, int width, int height, int xDestination, int yDestination, string message)
     : base(game, xSource, ySource, width, height, xDestination, yDestination, null, 40)
 {
     timeScheme  = new FischerTimeScheme(180, 5);
     this.msgStr = message;
     this.parent = parent;
     LoadContent();
 }
Пример #5
0
 public static PanelHistory createReference(Game game, CompoundGameComponent parent)
 {
     if (panelInfo == null)
     {
         panelInfo = new PanelHistory(game, parent);
     }
     return(panelInfo);
 }
Пример #6
0
 //<Singleton Pattern>
 protected PanelHistory(Game game, CompoundGameComponent parent)
     : base(game, parent, "Panels\\SideHandle2", "Panels\\CompletePane2", 170 /*height*/)
 {
     lastEvents     = new Queue <Message>();
     font           = Game.Content.Load <SpriteFont>("Fonts/InfoFontSmall");
     curSpriteBatch = (SpriteBatch)Game.Services.GetService(typeof(SpriteBatch));
     linesNum       = 0;
 }
Пример #7
0
 public CompoundGameComponent(Game game, CompoundGameComponent parent) : base(game)   //tree-structure
 {
     subComponents = new List <GameComponent>();
     this.parent   = parent;
     if (parent != null)
     {
         parent.SubComponents.Add(this); //attach this node to the tree
     }
 }
Пример #8
0
 public PlayerNamePanel(
     Game game,
     CompoundGameComponent parent, int xSource, int ySource, int width, int height, int xDestination, int yDestination, string message, string defaultTextboxText)
     : base(game, xSource, ySource, width, height, xDestination, yDestination)
 {
     this.msgStr             = message;
     this.parent             = parent;
     this.defaultTextboxText = defaultTextboxText;
     LoadContent();
 }
Пример #9
0
 public Chessboard getChessboard(CompoundGameComponent parent) //factory method h3h3h3
 {
     if (chessboard == null)
     {
         chessboard = new Chessboard(game, parent, checkers, models, chessboardTexture);
         if (game.Services.GetService(typeof(Chessboard)) != null)
         {
             game.Services.RemoveService(typeof(Chessboard));
         }
         game.Services.AddService(typeof(Chessboard), chessboard);
     }
     return(chessboard);
 }
Пример #10
0
 public TimerPanelNothing(Game game,
                          CompoundGameComponent parent,
                          int xSource, int ySource,
                          int width, int height,
                          int xDestination, int yDestination,
                          string message
                          )
     : base(
         game, parent,
         xSource, ySource,
         width, height,
         xDestination, yDestination,
         message)
 {
     LoadContent();
 }
Пример #11
0
 public Chessboard(Game game, CompoundGameComponent parent, Checker[, ,] checkers, ChessModel[] models, AbstractBorderTexture[,] chessboardTexture)
     : base(game, parent)
 {
     cam                    = (GameCamera)game.Services.GetService(typeof(BasicCamera));
     this.checkers          = checkers;
     this.models            = models;
     this.chessboardTexture = chessboardTexture;
     spacingValue           = models[0].PrefferedModelHeight;
     currentLevel           = 8;
     LoadContent();
     //SETTING ALPHA
     //Game.GraphicsDevice.RenderState.SourceBlend = Blend.SourceAlpha; // source rgb * source alpha
     //Game.GraphicsDevice.RenderState.AlphaSourceBlend = Blend.One; // don't modify source alpha
     //Game.GraphicsDevice.RenderState.DestinationBlend = Blend.InverseSourceAlpha; // dest rgb * (255 - source alpha)
     //Game.GraphicsDevice.RenderState.AlphaDestinationBlend = Blend.InverseSourceAlpha; // dest alpha * (255 - source alpha)
     //Game.GraphicsDevice.RenderState.BlendFunction = BlendFunction.Add; // add source and dest results
 }
Пример #12
0
 public ToggleMenuPanel(
     Game game, CompoundGameComponent parent,
     int xSource, int ySource,
     int width, int height,
     int xDestination, int yDestination,
     string message,
     string option1,
     string option2
     )
     : base(game, xSource, ySource, width, height, xDestination, yDestination)
 {
     this.msgStr     = message;
     this.parent     = parent;
     this.option1Str = option1;
     this.option2Str = option2;
     LoadContent();
 }
Пример #13
0
 public TimerPanelOneSubPanel(Game game,
                              CompoundGameComponent parent,
                              int xSource, int ySource,
                              int width, int height,
                              int xDestination,
                              int yDestination,
                              string message,
                              string explanation,
                              string subExplanation,
                              string units,
                              int maxInt
                              )
     : base(game, xSource, ySource, width, height, xDestination, yDestination)
 {
     this.msgStr            = message;
     this.explanationStr    = explanation;
     this.subExplanationStr = subExplanation;
     this.unitsStr          = units;
     this.maxInt            = maxInt;
     this.parent            = parent;
     LoadContent();
 }
Пример #14
0
 public TimerPanelTwoSubPanels(
     Game game,
     CompoundGameComponent parent,
     int xSource, int ySource,
     int width, int height,
     int xDestination,
     int yDestination,
     string message,
     string explanation,
     string subExplanation1,
     string units1,
     string subExplanation2,
     string units2,
     int maxInt1,
     int maxInt2
     ) :
     base(game, parent, xSource, ySource, width, height, xDestination, yDestination, message, explanation, subExplanation1, units1, maxInt1)
 {
     this.subExplanation2str = subExplanation2;
     this.units2str          = units2;
     this.maxInt2            = maxInt2;
     LoadContent1();
 }
Пример #15
0
 public PanelTime(Game game, CompoundGameComponent parent, AbstractTimeScheme timeScheme) : base(game, parent, "Panels\\SideHandle", "Panels\\CompletePane", 10)
 {
     this.time = timeScheme;
     time.Start();
     LoadContent();
 }
Пример #16
0
 public Panel2D(Game game, CompoundGameComponent parent)
     : base(game, parent, "Panels\\SideHandle3", "Panels\\CompletePane3", 330)
 {
     LoadContent();
 }
Пример #17
0
 public PanelPause(Game game, CompoundGameComponent parent)
     : base(game, parent)
 {
     LoadContent();
 }