Beispiel #1
0
        // Fields.
        // Constructor.
        public HUD(Game1 game, Texture2D texture, Cursor cursor, Sprite sprite)
        {
            this.texture = texture;
            this.cursor = cursor;
            this.game = game;
            this.sprite = sprite;

            InitComponent();
        }
Beispiel #2
0
 // Constructor.
 public GameMain(Game1 game, int sizeX, int sizeY)
 {
     this.game = game;
     selection = new SelectionTile(Ressources.SelectionTest);
     mapBackground = new Map(Ressources.tileSetFloorInt, this.cursor, this.selection, 6, 0, map1);
     mapMiddleground = new Map(Ressources.tileSetInterieur, this.cursor, this.selection, 5, 4, map2);
     cursor = new Cursor(32, 32, 2);
     sprite = new Sprite(new Vector2(875, 30), 5, 4, 6 ,0, 0 ,0);
     hud = new HUD(this.game, Ressources.textureHUD, this.cursor, this.sprite);
 }
Beispiel #3
0
 // Constructor.
 public Map(Texture2D tileSet, Cursor CurrentCursor, SelectionTile currentSelection, int tileSetX, int tileSetY, int[,] mapTab)
 {
     this.cursor = CurrentCursor;
     this.tileSet = tileSet;
     this.tileSetX = tileSetX;
     this.tileSetY = tileSetY;
     this.mapTab = mapTab;
     this.mapChanged = true;
     this.selection = currentSelection;
 }
Beispiel #4
0
        // Constructor.
        public Button(Game1 game, Cursor cursor, Texture2D texture, Vector2 position, string function, string title)
        {
            this.game = game;
            this.texture = texture;
            this.cursor = cursor;
            this.hitbox = new Rectangle((int)position.X, (int)position.Y, texture.Width, texture.Height);
            this.title = title;
            this.colorTitle = Color.Black;
            this.colorAlpha = Color.White;
            this.function = function;
            this.backState = BackButtonState.Released;

            /* Collsions */
            this.textureData = new Color[this.texture.Width * this.texture.Height];
            this.texture.GetData(this.textureData);
        }