예제 #1
0
        private void bindGame()
        {
            Sumo blueSumo = new Sumo(Sumo.Type.Blue, iGetScoreOf(Sumo.Type.Blue), m_sumoSettings);
            Sumo redSumo  = new Sumo(Sumo.Type.Red, iGetScoreOf(Sumo.Type.Red), m_sumoSettings);
            Game game     = new Game(new Sumo[] { blueSumo, redSumo });

            Container.Bind <Game>().FromInstance(game).AsSingle();
        }
예제 #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            bakgrund    = new bakgrund(Content.Load <Texture2D>("isplatta"), Window.ClientBounds.Width / 2, Window.ClientBounds.Height / 2);
            sumo        = new Sumo(Content.Load <Texture2D>("stone"), 400, 300, 0f, 0f);
            sumo2       = new Sumo2(Content.Load <Texture2D>("mine"), 400, 400, 10.5f, 8.5f);

            // TODO: use this.Content to load your game content here
        }
예제 #3
0
 public void Construct(SumoControls _controls,
                       Slime.Factory _slimeFactory,
                       Sumo _sumoModel,
                       Game _game)
 {
     m_controls     = _controls;
     m_slimeFactory = _slimeFactory;
     m_sumoModel    = _sumoModel;
     m_game         = _game;
 }
예제 #4
0
 public void Construct(SumoAnimator _animator,
                       SumoControls _controls,
                       Sumo _sumoModel,
                       Game _game)
 {
     m_animator  = _animator;
     m_controls  = _controls;
     m_sumoModel = _sumoModel;
     m_game      = _game;
 }
예제 #5
0
        private void checkForScoreIcrease(int _iHealth)
        {
            if (_iHealth > 0)
            {
                return;
            }

            foreach (Sumo.Type type in Enum.GetValues(typeof(Sumo.Type)))
            {
                Sumo sumo = m_game.sumoGet(type);
                if (sumo.iHealth > 0)
                {
                    sumo.increaseScore();
                }
            }
        }
예제 #6
0
 public void Construct(Sumo _sumoModel, Game _game)
 {
     m_sumoModel = _sumoModel;
     m_game      = _game;
 }
예제 #7
0
 public void Construct(Sumo _sumoModel)
 {
     m_sumoModel = _sumoModel;
 }
예제 #8
0
 public void Construct(Sumo _sumo, Game _game)
 {
     m_sumo = _sumo;
     m_game = _game;
 }
예제 #9
0
 private void Construct(Sumo _sumo)
 {
     m_sumo = _sumo;
 }
예제 #10
0
 public void Construct(Sumo _sumo)
 {
     m_sumo = _sumo;
 }