예제 #1
0
        public InfoPlayer(Screen parent, Vector2 position, Texture2D texture, Player player)
            : base(parent, position, texture)
        {
            actualPlayer = player;
            this.texture = texture;

            isMoving = false;
        }
예제 #2
0
        protected override void LoadContent()
        {
            spriteBatch = new UberSpriteBatch(GraphicsDevice); // Charge notre spriteBatch personnalise
            TexturesManager.Load(Content); // Charge les textures
            cursor = new CursoManagers(TexturesManager.Cursor);
            RandomManager.Init();

            currentScreen = new StartMenu();
        }
예제 #3
0
        public DialogWindow(Screen parent, Vector2 position, Texture2D texture)
            : base(parent, position, texture)
        {
            this.position = position;
            this.texture = texture;

            printNext = new Button(position + new Vector2(texture.Width - TexturesManager.Next.Width - 10, texture.Height - TexturesManager.Next.Height - 10), TexturesManager.Next);

            printNext.MouseClick += OnPrintNextGameMouseClick;
        }
예제 #4
0
        public SoundProperties(Screen parent, Vector2 position, Texture2D texture)
            : base(parent, position, texture)
        {
            this.texture = texture;

            songSlide = new Button(position + new Vector2(TexturesManager.Window.Width / 2, TexturesManager.MovingCursor.Height + 5) - new Vector2(TexturesManager.MovingCursor.Width / 2, 0), TexturesManager.MovingCursor, TexturesManager.Window.Width);
            soundEffectSlide = new Button(position + new Vector2(TexturesManager.Window.Width / 2, TexturesManager.MovingCursor.Height + 5) - new Vector2(TexturesManager.MovingCursor.Width / 2, 0) + new Vector2(0,50), TexturesManager.MovingCursor, TexturesManager.Window.Width);

            songSlide.MouseClicking += onSongSlideClicking;
            soundEffectSlide.MouseClicking += onSoundEffectSlideClicking;
        }
예제 #5
0
파일: Panel.cs 프로젝트: wiilinkpds/Wotrn
        public Panel(Screen parent, Vector2 position, Texture2D texture,Player player)
            : base(parent, position, texture)
        {
            infoPlayerWindow = new InfoPlayer(parent, new Vector2(MainGame.ScreenX - 200, 5), TexturesManager.Window ,player);
            spellListWindow = new SpellList(parent, new Vector2(MainGame.ScreenX - 500, 5), TexturesManager.Window, player);

            infoPlayerButton = new Button(position, TexturesManager.InfoButton);
            spellListButton = new Button(position + new Vector2(0, TexturesManager.SpellButton.Height), TexturesManager.SpellButton);

            infoPlayerButton.MouseClick += OnInfoPlayerMouseClick;
            spellListButton.MouseClick += OnSpellListMouseClick;
        }
예제 #6
0
 public LocalClient(Screen parent, Vector2 position)
     : base(parent, position)
 {
     name = "";
     Bounds = new Rectangle((int)position.X, (int)position.Y, MainGame.ScreenX / 2, MainGame.ScreenY / 2);
     box = new List<TextBox>();
     box.Add(new TextBox(new Vector2(Bounds.X + 20 + TexturesManager.Menu.MeasureString("Port :").X, Bounds.Y + 50), 6, 1, TexturesManager.Menu, Color.Blue, Color.Red));
     box[0].IsSelect = true;
     box.Add(new TextBox(new Vector2(box[0].Bound.X + box[0].Bound.Width + 20 + TexturesManager.Menu.MeasureString("Nom :").X, box[0].Bound.Y), 20, 1, TexturesManager.Menu, Color.Blue, Color.Red));
     box.Add(new TextBox(new Vector2(Bounds.X + 20 + TexturesManager.Menu.MeasureString("Ip :").X, box[0].Bound.Bottom + 10),20,1,TexturesManager.Menu,Color.Blue,Color.Red));
     joinButton = new Button(new Vector2(box[2].Bound.Right + 10, box[2].Bound.Y), "Rejoindre" );
     joinButton.MouseClick += OnJoinMouseClick;
 }
예제 #7
0
        public EscapeMenu(Screen parent, Vector2 position)
            : base(parent, position)
        {
            launchMainButton = new Button(new Vector2(position.X, position.Y + 50), Res.ReturnMainMenu);
            optionButton = new Button(new Vector2(position.X, position.Y + 100), Res.Options);
            suicideButton = new Button(new Vector2(position.X, position.Y + 150), Res.GiveUp);
            quitGameButton = new Button(new Vector2(position.X, position.Y + 200), Res.LeaveGame);

            launchMainButton.MouseClick += OnLaunchMainButtonMouseClick;
            optionButton.MouseClick += OnOptionButtonMouseClick;
            suicideButton.MouseClick += OnSuicideButtonMouseClick;
            quitGameButton.MouseClick += OnQuitGameMouseClick;
        }
예제 #8
0
        public MultiLocalWindow(Screen parent, Vector2 position, Texture2D texture)
            : base(parent, position, texture)
        {
            this.parent = parent;
            Bounds = new Rectangle((int)Position.X, (int)Position.Y, MainGame.ScreenX / 8, MainGame.ScreenY / 8);
            this.texture = texture;
            Serveur = new Button(new Vector2(Bounds.X + Bounds.Width / 4, Bounds.Y + Bounds.Height / 4),"Serveur" );
            Serveur.MouseClick += OnServeurMouseClick;
            localServeur = new LocalServeur(parent, new Vector2(Bounds.X + Bounds.Width + 10, Serveur.Bounds.Y));

            Client = new Button(new Vector2(Bounds.X + Bounds.Width / 4, Bounds.Y + Bounds.Height / 2), "Client");
            Client.MouseClick += OnClientMouseClick;
            localClient = new LocalClient(parent, new Vector2(Bounds.X + Bounds.Width + 10 , Client.Bounds.Y));
        }
예제 #9
0
 public LocalServeur(Screen parent, Vector2 position)
     : base(parent, position)
 {
     isCreate = false;
     name = "";
     box = new List<TextBox>();
     Bounds = new Rectangle((int) position.X, (int) position.Y, 2*MainGame.ScreenX/3, MainGame.ScreenY/2);
     StartButton = new Button(new Vector2(Bounds.X + Bounds.Width - TexturesManager.Menu.MeasureString("Lancer").X - 30, Bounds.Y + Bounds.Height - TexturesManager.Menu.MeasureString("Lancer").Y - 15), "Lancer");
     createButton = new Button(new Vector2(Bounds.X + Bounds.Width - TexturesManager.Menu.MeasureString("Créer").X - 30, Bounds.Y + 50),"Créer");
     createButton.MouseClick += OnCreateMouseClick;
     box.Add(new TextBox(new Vector2(Bounds.X + 20 + TexturesManager.Menu.MeasureString("Port :").X, Bounds.Y + 50),6,1,TexturesManager.Menu,Color.Blue,Color.Red));
     box[0].IsSelect = true;
     box.Add(new TextBox(new Vector2(box[0].Bound.X + box[0].Bound.Width + 20 + TexturesManager.Menu.MeasureString("Nom :").X,box[0].Bound.Y),20,1, TexturesManager.Menu, Color.Blue,Color.Red));
 }
예제 #10
0
        protected override void LoadContent()
        {
            spriteBatch = new UberSpriteBatch(GraphicsDevice); // Charge notre spriteBatch personnalise
            TexturesManager.Load(Content); // Charge les textures
            CursorManager.CurrentTexture = TexturesManager.Cursor;
            RandomManager.Init();
            XactManager.Load();
            currentScreen = new StartMenu();

            XactManager.PlaySong("Menu01");
            XactManager.Engine.GetCategory("Music").SetVolume(0.5f);
            XactManager.Engine.GetCategory("SoundEffect").SetVolume(0.5f);
        }
예제 #11
0
 public void SetScreen(Screen screen)
 {
     currentScreen = screen;
 }
예제 #12
0
파일: Window.cs 프로젝트: wiilinkpds/Wotrn
 protected Window(Screen parent, Vector2 position, Texture2D texture)
 {
     Parent = parent;
     Position = position;
     Bounds = new Rectangle((int)position.X, (int)position.Y, texture.Width, texture.Height);
 }
예제 #13
0
파일: Window.cs 프로젝트: wiilinkpds/Wotrn
 protected Window(Screen parent, Vector2 position)
 {
     Parent = parent;
     Position = position;
 }
예제 #14
0
 public KeyBinding(Screen parent, Vector2 position, Texture2D texture)
     : base(parent, position, texture)
 {
 }