コード例 #1
0
        public MenuScreen(Game game, SpriteBatch spriteBatch, int screenHeight, int screenWidth)
        {
            this.Game = game;
            this.SpriteBatch = spriteBatch;
            ScreenHeight = screenHeight;
            ScreenWidth = screenWidth;
            Topics = new List<String>();
            SettingButtons = new List<SettingButton>();
            EnabledButtons = new List<Button>();
            MovingTopics = new List<Animation>();
            DBhelper = DatabaseHelper.Instance;

            // Set state to first state where user can choose topics
            ScreenState = State.ChooseTopic;
        }
コード例 #2
0
        public QuestionButton(Game game, Texture2D tex, Rectangle pos, Rectangle target, List<String> topics, DatabaseHelper dbhelper)
            : base(game, tex, pos, target)
        {
            databaseHelper = dbhelper;
            Rotation = 0;

            completedQuestions = new List<int>();
            content = game.Content;

            OriginOffset = new Vector2(0, 0);
            PossibleQuestions = new List<int>();
            QuestionFrequency = new Hashtable();

            // Set starting question
            currentTopics = topics;
        }