Exemplo n.º 1
0
 public StageGenerator(Texture2D[] road_textures, Texture2D[][] scenery_textures, StageManager stagemanager)
 {
     m_stagemanager               = stagemanager;
     m_road_textures              = road_textures;
     m_scenery_textures           = scenery_textures;
     m_stagemanager.RoadWidth     = m_road_textures[(int)SegmentType.Flat].Width;
     m_stagemanager.RoadHeight    = m_road_textures[(int)SegmentType.Flat].Height;
     m_slope_height_increase_dict = CreateHeightDictionary();
     stageparser          = new StageParser(m_stagemanager.RoadWidth);
     m_stages_to_generate = stageparser.ParseStages();
 }
Exemplo n.º 2
0
        public void Init()
        {
            dots = new AnimatedGameObject(new Vector2(100, 100), dots_texture, 2, 3);

            // Init UI
            panel1 = ui_manager.GetRootPanel.AddPanel(new Vector4(0.0f, 0.00f, 1f, 1f));
            //panel2 = new Panel(ui_manager.GetRootPanel, new Vector4(0.2f, 0.1f, 0.6875f, 0.5083333f));
            //panel2 = new Panel(ui_manager.GetRootPanel, new Vector4(0.40f, 0.00f, 0.6f, 0.6f));
            //panel2.Enable = true;
            button1 = panel1.AddButton(new Vector4(0.0f, 0.0f, 0.2f, 0.2f), Print);

            panel1.Texture = UI_overlay;
            //panel2.Texture = UI_overlay;
            m_stagemanager = new StageManager(m_road_textures, m_scenery_textures, m_bike_tex, m_camera, pinky);
            //panel1.AddSlider(new Vector2(0.1f, 0.1f), 50, false);

            /*
             * Table table1 = panel1.AddTable(new Vector2(0.15f, 0.2f), (Texture2D)m_gui_object_textures["TableContainer"], (Texture2D)m_gui_object_textures["TableRow"]);
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             * table1.AddRow();
             */
            m_game_started = true;
        }
Exemplo n.º 3
0
 public Rider(Vector2 position, Texture2D texture, float rotation, float speed, float road_offset, StageManager stage) : base(position, texture, rotation)
 {
     m_speed         = speed;
     m_current_stage = stage;
     m_road_offset   = road_offset;
 }