示例#1
0
        public MoteurJeu(MoteurSysteme moteurSysteme)
        {
            this.moteurSysteme = moteurSysteme;

            camera = new Vector2(550, 100);

            user = new EvenementUtilisateur();

            carte = new Carte(moteurSysteme.carteArray, camera, 64, 64, 32, 16);

            gui = new Interface(carte, moteurSysteme);
        }
示例#2
0
        public Interface(Carte carte, MoteurSysteme moteurSysteme)
        {
            this.carte = carte;
            this.moteurSysteme = moteurSysteme;

            position = new Vector2(10, 150);
            positionPalette = new Vector2(10, 250);

            outilSelect = 'S';

            boutonModeSelection = new Bouton(new Rectangle((int)position.X, (int)position.Y, 30, 25), "S", "selection tool (s)");
            boutonModePoint = new Bouton(new Rectangle((int)position.X + 30, (int)position.Y, 30, 25), "P", "point tool (p)");

            boutonAddLayer = new Bouton(new Rectangle((int)position.X, (int)position.Y + 50, 30, 25), "a", "add a layer (a)");
            boutonRemoveLayer = new Bouton(new Rectangle((int)position.X + 30, (int)position.Y + 50, 30, 25), "r", "remove a layer (r)");
            boutonUpLayer = new Bouton(new Rectangle((int)position.X + 30 * 2, (int)position.Y + 50, 30, 25), "+", "move up (q)");
            boutonDownLayer = new Bouton(new Rectangle((int)position.X + 30 * 3, (int)position.Y + 50, 30, 25), "-", "move down (s)");

            boutonAddDim = new Bouton(new Rectangle((int)position.X , (int)position.Y + 270, 70, 25), "Dim +", "add a dimension (n)");

            boutonSave = new Bouton(new Rectangle((int)position.X, (int)position.Y + 270 + 50, 150, 25), "Save", "save the current the map (ctrl + s)");

            boutonModePoint.isSelect = true;
        }