コード例 #1
0
ファイル: Board.cs プロジェクト: J-O-K-E-R/Stern-Halma
 /// <summary>
 /// Constructor
 /// Initializes all buttons and board
 /// </summary>
 public Board() {
     //the back button vector
     backb = new Vector2(0, Game1.ScreenHeight - 50);
     //the Chess Button vector
     chessb = new Vector2(Game1.ScreenWidth - 200, 200);
     //the Checkers button vector
     checkersb = new Vector2(Game1.ScreenWidth - 200, 300);
     //The Chinese Checkers or Sterne-Halma button vector
     chineseb = new Vector2(Game1.ScreenWidth - 200, 400);
     //The reset button vector
     resetb = new Vector2(Game1.ScreenWidth - 200, 500);
     //creates the back button
     back = new Button(backb, "back", "");
     //creates the chess button
     chess = new Button(chessb, "blank", "Chess");
     //creates the checkers button
     checkers = new Button(checkersb, "blank", "Checkers");
     //creates the chinese checkers button
     chinese = new Button(chineseb, "blank", "Sterne-Halma");
     //creates the reset button
     reset = new Button(resetb, "blank", "Reset");
     //initializes to the checkers board
     if (Game1.hosting) {
         currentGame = new Host_Intro();
         _type = "HIntro";
         _gametype = "HIntro";
     }
     else {
         currentGame = new Join_Intro();
         _type = "JIntro";
         _gametype = "JIntro";
     }
 }
コード例 #2
0
ファイル: PreGame.cs プロジェクト: J-O-K-E-R/Stern-Halma
 /// <summary>
 /// Constructor that places the buttons and creates a Host object 
 /// Also gets the ip address to start connections
 /// </summary>
 public PreGame() {
     backb = new Vector2(0, Game1.ScreenHeight - 50);
     back = new Button(backb, "back", "");
     start = new Button(startb, "blank", "Start");
     Host host = new Host();
     host.Create();
     ip = Host.hostAddress.ToString();
 }
コード例 #3
0
ファイル: Menu.cs プロジェクト: J-O-K-E-R/Stern-Halma
        /// <summary>
        /// Constructor that creates the location and buttons
        /// </summary>
        public Menu() {
            hostb = new Vector2(butmid, 300);
            joinb = new Vector2(butmid, 375);
            creditb = new Vector2(butmid, 450);
            host = new Button(hostb, "blank", "Host");
            join = new Button(joinb, "blank", "Join");
            credit = new Button(creditb, "blank", "Credits");

        }
コード例 #4
0
ファイル: Setup.cs プロジェクト: J-O-K-E-R/Stern-Halma
        /// <summary>
        /// Constructor that sets up the screen with buttons and where they should go
        /// Also tells the system that they are not hosting the game and is not the server
        /// Also adds MouseListenerStettings
        /// </summary>
        public Setup() {
            joinb = new Vector2(Game1.ScreenWidth / 2 - 75, Game1.ScreenHeight/2 - 55);
            Connect = new Button(joinb, "blank", "Connect");
            test = new InputText(Game1.ScreenWidth/2 - 90, Game1.ScreenHeight/2 - 100, 200, 25);
            backb = new Vector2(0, Game1.ScreenHeight - 50);
            back = new Button(backb, "back", "");
            var mouseListener = Game1.inputManager.AddListener(new MouseListenerSettings());
            Game1.hosting = false;

        }
コード例 #5
0
ファイル: Credits.cs プロジェクト: J-O-K-E-R/Stern-Halma
        /// <summary>
        /// Constructor that sets up the screen with buttons and where they should go
        /// Also tells the system that they are not hosting the game and is not the server
        /// Also adds MouseListenerStettings
        /// </summary>
        public Credits() {
            backb = new Vector2(0, Game1.ScreenHeight - 50);
            back = new Button(backb, "back", "");
            var mouseListener = Game1.inputManager.AddListener(new MouseListenerSettings());

        }