Example #1
0
        public Field(Game game, int Level, Difficulty difficulty)
            : base(game)
        {
            therand = new Random(); // Good enough randomization for now?

            m_difficulty = difficulty;

            RandomField();

            m_below_field = new BlockColour[6, 2];

            for (int x = 0; x < 6; x++)
            {
                m_below_field[x, 0] = m_field[x, 0].Colour;
            }
            MakeBelowRow();
            MakeBelowRow();

            m_lift_phase = 0;
            m_cruiser_pos = new Point(2, 5);
            m_state = GameState.Main;
            m_counter = 60;
            m_level = Level;
            m_score = 0;
            m_fast_lifting = false;
            m_chain_length = 1;

            CalcLiftSpeed();
            CalcFlashFrames();
        }
Example #2
0
        public TextureAtlas Build(Game game)
        {
            Bitmap b;
            List<TextureInfo> elements;

            InnerBuild(out b, out elements);
            return new TextureAtlas(b, game, elements);
        }
Example #3
0
 public TextureAtlas(Bitmap data, Game game, List<TextureInfo> elements)
     : base(data, game)
 {
     m_elements = new Dictionary<string, TextureInfo>();
     foreach (TextureInfo i in elements)
     {
         m_elements.Add(i.Name, i);
     }
 }
Example #4
0
 public TestEndlessMode(Game game)
     : base(game)
 {
     zoom = game.Window.Height / 960.0f;
 }
Example #5
0
 public GameComponent(Game game)
 {
     m_game = game;
 }
Example #6
0
 public GameMode(Game game)
 {
     m_game = game;
 }
Example #7
0
 public Texture2D(String filename, Game game)
     : this(filename, game.Context, game.Window.WindowInfo)
 {
 }
Example #8
0
 public Texture2D(Stream data, Game game)
     : this(data, game.Context, game.Window.WindowInfo)
 {
 }
Example #9
0
 public Texture2D(Bitmap data, Game game)
     : this(data, game.Context, game.Window.WindowInfo)
 {
 }
Example #10
0
 public AtlasBuilder(Game game)
 {
     Init();
     Game = game;
 }
Example #11
0
 public TestMode(Game game)
     : base(game)
 {
 }
Example #12
0
 public SpriteCollection(Game game)
     : this(game.Context)
 {
 }