Ejemplo n.º 1
0
        public Menu()
        {
            Play         = new Button(new Point(140, 50), Resources.btnPlayDark, Resources.btnPlay, 150, 70);
            Achiev       = new Button(new Point(140, 130), Resources.btnAchievDark, Resources.btnAchiev, 150, 70);
            Leaderboards = new Button(new Point(140, 210), Resources.btnLeadDark, Resources.btnLead, 150, 70);
            Quit         = new Button(new Point(140, 290), Resources.btnQuitDark, Resources.btnQuit, 150, 70);
            Easy         = new Button(new Point(55, 375), Resources.btnEasyDark, Resources.btnEasy, 90, 90);
            Medium       = new Button(new Point(175, 375), Resources.btnMediumDark, Resources.btnMedium, 90, 90);
            Hard         = new Button(new Point(295, 375), Resources.btnHardDark, Resources.btnHard, 90, 90);
            Diff         = difficulty.EASY;
            Easy.Clicked = true;
            InitializeComponent();
            this.BackgroundImage = Resources.background;
            DoubleBuffered       = true;
            skinImage            = new ImageWrapper(Resources.mine);
            skinImage.getImage().Tag = "Mine";

            // try read from file, if can -> overwrite this ^ list
            if (LoadAchievements() != null)
            {
                achievements = LoadAchievements();
            }
            else
            {
                achievements = new List <Achievement>();
                achievements.Add(new Achievement("Baloon", Resources.baloon, Resources.baloonLocked, 45, difficulty.EASY));
                achievements.Add(new Achievement("Nuke", Resources.nuke, Resources.nukeLocked, 15, difficulty.EASY));
                achievements.Add(new Achievement("Poison", Resources.poison, Resources.poisonLocked, 240, difficulty.INTERMEDIATE));
                achievements.Add(new Achievement("Shuriken", Resources.shuriken, Resources.shurikenLocked, 120, difficulty.INTERMEDIATE));
                achievements.Add(new Achievement("Trap", Resources.trap, Resources.trapLocked, 600, difficulty.HARD));
                achievements.Add(new Achievement("Bomb", Resources.bomb, Resources.bombLocked, 480, difficulty.HARD));
            }
        }
Ejemplo n.º 2
0
        public Game(difficulty d, ImageWrapper s, List <Achievement> achievements)
        {
            this.skin = s.getImage();
            DIFF      = difficulty.NONE;

            this.DoubleBuffered = true;

            //default tile size

            InitializeComponent();
            this.achievements = achievements;
            newGame(d);
        }