Beispiel #1
0
        public MyObject(ObjectType T, Graphics g, int x, int y)
        {
            this.x = x;
            this.y = y;
            OT     = T;
            xGraph = g;
            ox     = oy = 0;

            TimerGenerator.AddTimerEventHandler(TimerType.TT_50, OnChange);
        }
Beispiel #2
0
        public void Load_Level(LevelManagerLoadTypes levelLoadType)
        {
            TimerGenerator.RemoveAllTimerEvents();

            Init_Properties();

            lev = LevelManager.Instance.LoadLevel(levelLoadType);

            lev.MarioObject.OnMarioDied += (() => Load_Level(LevelManagerLoadTypes.RELOAD));

            lev.MarioObject.x = 20;
            lev.MarioObject.y = LevelGenerator.LevelHeight - 16 * 1 - lev.MarioObject.height;
            LevelGenerator.CurrentLevel.Update_ScreensX();
            LevelGenerator.CurrentLevel.Update_ScreensY();

            LevelBeginTime = DateTime.Now;

            Invalidate();
        }