コード例 #1
0
ファイル: HudCombat.cs プロジェクト: MetaCorp/PowerOfZonhya
        public HudCombat(Combat combat)
        {
            this.combat = combat;

            boutonLancerCombat = new Menu(new Vector2(Constante.WindowWidth / 2 - 50, Constante.WindowHeight - 100), new string[1] {"Lancer"},
                                          100, 40, 40, true);
            boutonLancerCombat.Activer();

            boutonLoot = new Bouton(new Rectangle(100, 100, Constante.WindowWidth - 100 * 2, Constante.WindowHeight - 100 * 2), "Cliquer pour fermer");
        }
コード例 #2
0
ファイル: MoteurJeu.cs プロジェクト: MetaCorp/PowerOfZonhya
        public MoteurJeu(MoteurSysteme moteurSysteme, MoteurPhysique moteurPhysique)
        {
            statusJeu = Status.MenuAccueil;

            meteo = Meteo.Neige;

            menuManager = new MenuManager(this);

            this.moteurPhysique = moteurPhysique;
            this.moteurSysteme = moteurSysteme;

            evenementUtilisateur = new EvenementUtilisateur();

            menuAccueuilFond = new Sprite(new Rectangle(0, 0, Constante.WindowWidth, Constante.WindowHeight));

            carte = new Carte(moteurPhysique, moteurSysteme.carteArray, Vector2.Zero, 64, 64, 32, 16);

            carte.SetCarte();

            personnage = new Personnage("Meta", new Vector2(3, 3), moteurPhysique.collisionCarte);
            monstres.Add(new Monstre(MonstreType.rondoudou, new Vector2(10, 8), moteurPhysique.collisionCarte));
            //monstres.Add(new Monstre(MonstreType.brasegali, new Vector2(3, 5), moteurPhysique.collisionCarte));

            hud = new HUD(personnage);

            animations.Add(new Animation());

            combat = new Combat(moteurPhysique, evenementUtilisateur);
        }