Ejemplo n.º 1
0
        void InitializingComponents()
        {
            CameraMgr.Init(Game.ScreenCenter, Game.ScreenCenter);

            ScorePointsSystem.Init();
            ScorePointsSystem.LoadRecordScore();

            EnemyMgr.Init();
            BulletMgr.Init();

            background = new Background("background");

            Player = new Player(new Vector2(Game.ScreenCenter.X, 620));
        }
Ejemplo n.º 2
0
        public override void Update()
        {
            ScorePointsSystem.GameTimeUpdate(Game.window.deltaTime);
            EnemyMgr.Update();

            if (IsPlayerAlive)
            {
                AudioMgr.Update("Game_ST");
            }
            UpdateMgr.Update();
            PhysicsMgr.Update();
            PhysicsMgr.CheckCollision();
            CameraMgr.Update();
        }
Ejemplo n.º 3
0
        public TextChar(Vector2 pos, char ch, Font font) : base(pos, font.TextureName, DrawMgr.Layer.GUI)
        {
            this.font = font;
            charW     = this.font.CharW;
            charH     = this.font.CharH;
            scale     = font.Scale;

            Sprite        = new Sprite(charW * scale, charH * scale);
            Position      = pos;
            Sprite.pivot  = new Vector2(Sprite.Width / 2, Sprite.Height / 2);
            Sprite.Camera = CameraMgr.GetCamera("GUI");

            Character = ch;
            UpdateMgr.Add(this);
            DrawMgr.Add(this);
        }