Ejemplo n.º 1
0
        public void Init(LevelManager <PinballLevel> levelManager, Bound bound, Rectangle screenRect)
        {
            ballManager  = BallManager.GetInstance();
            bonusManager = BonusManager.GetInstance();
            scoreManager = ScoreManager.GetInstance();
            this.bound   = bound;
            lifeManager  = LifeManager.GetInstance();
            ScreenRect   = screenRect;

            this.levelManager = levelManager;
        }
Ejemplo n.º 2
0
        public PlayState(int lives)
        {
            bonusManager = BonusManager.GetInstance();
            levelManager = LevelManager <PinballLevel> .GetInstance();

            ballManager  = BallManager.GetInstance();
            scoreManager = ScoreManager.GetInstance();
            gameManager  = GameManager.GetInstance();
            stateManager = StateManager.GetInstance();

            gui = new PlayInterface(GameManager.GetInstance().ScreenRect);
            gui.Initialize(ballManager.GameBallPrototype.Sprite.Clone());
            gui.LivesChanged(lives);
            lifeManager                 = LifeManager.GetInstance();
            lifeManager.Lives           = lives;
            lifeManager.OnLivesChanged += LivesChanged;

            gameManager.OnGameOver += OnGameOver;


            levelManager.SetLevel(1);
        }
Ejemplo n.º 3
0
 public GameOverState()
 {
     scoreManager = ScoreManager.GetInstance();
     gui          = new GameOverInterface(scoreManager.Score, scoreManager.HighScore, GameManager.GetInstance().ScreenRect);
 }