Пример #1
0
        //Initialization and content loading
        public static void Initialize()
        {
            //Creates folder structure if nescessary
            CreateFolderStructure();
            frameCounter = new FrameCounter();

            random = new Random();

            TextureHandler.Initialize();
            InputHandler.Initialize();
            FontHandler.Initialize();
            displayGames             = new DisplayGames();
            playerInformationHandler = PlayerInformationHandler.Initialize();
            Tick = 0;
            MouseHandler.Initialize();
            store = new Store(playerInformationHandler, (int)States.Store);
        }
Пример #2
0
        public Store(PlayerInformationHandler playerInformationHandler, int state)
        {
            defaultState = state;
            _playerInformationHandler = playerInformationHandler;

            MainStore = new Dictionary <int, List <StoreItem> >()
            {
                { 0, new List <StoreItem>() },
            };

            for (int i = 1; i <= MainStore.Count; i++)
            {
                _currentWidth.Add(0);
            }

            selected = new int[MainStore.Count];
            Array.Fill(selected, 0);

            LoadStateChangeVariables();
        }