コード例 #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
ファイル: SettingsMenuRoot.cs プロジェクト: samibader/3DChess
 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
ファイル: PanelDynamic.cs プロジェクト: samibader/3DChess
 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
ファイル: ToggleMenuPanel.cs プロジェクト: samibader/3DChess
 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
ファイル: Panel2D.cs プロジェクト: samibader/3DChess
 public Panel2D(Game game, CompoundGameComponent parent)
     : base(game, parent, "Panels\\SideHandle3", "Panels\\CompletePane3", 330)
 {
     LoadContent();
 }
コード例 #17
0
ファイル: PanelPause.cs プロジェクト: samibader/3DChess
 public PanelPause(Game game, CompoundGameComponent parent)
     : base(game, parent)
 {
     LoadContent();
 }