/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here moteurSysteme = new MoteurSysteme(); moteurJeu = new MoteurJeu(moteurSysteme); moteurGraphique = new MoteurGraphique(moteurJeu); base.Initialize(); }
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); }
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; }