Beispiel #1
0
        public Graphics_Paint(Game_Logic game_Logic)
        {
            charakter  = game_Logic.Charakter;
            rectangles = game_Logic.Rectangles;

            DinoAnimationImage     = Properties.Resources.Dinoanimation;
            CactiAnimationImag     = Properties.Resources.Cacti_Imges;
            LargCactiAnimationImag = Properties.Resources.LargCacti;
            GameOverSceenImg       = Properties.Resources.GameOverSceen;
            CloudImg  = Properties.Resources.clound;
            this.Base = Properties.Resources.BaseLine;

            animationIndex = 0;
            generator      = new Random();
            xRect          = 100; yRect = 100; x = 0;

            hitboxShow = false;
        }
Beispiel #2
0
        public Main_Form()
        {
            InitializeComponent();
            DoubleBuffered  = true;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            StartPosition   = FormStartPosition.CenterScreen;


            game_Logic     = new Game_Logic(ClientSize);
            graphics_Paint = new Graphics_Paint(game_Logic);

            timer          = new Timer();
            timer.Tick    += new EventHandler(TimerEventProcessor);
            timer.Interval = 17;
            timer.Start();
            frameCount = 500;
            score      = frameCount;

            clicked = 0;

            KeyUp += Key_Up;

            font = new Font("Symbol", 18, FontStyle.Bold);
        }