Esempio n. 1
0
File: Game.cs Progetto: torkleyy/ags
        public Game()
        {
            _guis                    = new GUIFolders(GUIFolder.MAIN_GUI_FOLDER_NAME);
            _inventoryItems          = new InventoryItemFolders(InventoryItemFolder.MAIN_INVENTORY_ITEM_FOLDER_NAME);
            _cursors                 = new List <MouseCursor>();
            _dialogs                 = new DialogFolders(DialogFolder.MAIN_DIALOG_FOLDER_NAME);
            _fonts                   = new List <Font>();
            _characters              = new CharacterFolders(CharacterFolder.MAIN_CHARACTER_FOLDER_NAME);
            _plugins                 = new List <Plugin>();
            _translations            = new List <Translation>();
            _rooms                   = new UnloadedRoomFolders(UnloadedRoomFolder.MAIN_UNLOADED_ROOM_FOLDER_NAME);
            _oldInteractionVariables = new List <OldInteractionVariable>();
            _settings                = new Settings();
            _defaultSetup            = new RuntimeSetup(_settings);
            _workspaceState          = new WorkspaceState();
            _palette                 = new PaletteEntry[PALETTE_SIZE];
            _sprites                 = new SpriteFolder("Main");
            _views                   = new ViewFolders("Main");
            _audioClips              = new AudioClipFolders("Main");
            _audioClipTypes          = new List <AudioClipType>();
            _textParser              = new TextParser();
            _lipSync                 = new LipSync();
            _propertySchema          = new CustomPropertySchema();
            _globalVariables         = new GlobalVariables();
            _globalMessages          = new string[NUMBER_OF_GLOBAL_MESSAGES];
            _deletedViewIDs          = new Dictionary <int, object>();
            _scripts                 = new ScriptFolders(ScriptFolder.MAIN_SCRIPT_FOLDER_NAME);
            _scriptsToCompile        = new ScriptsAndHeaders();
            ScriptAndHeader globalScript = new ScriptAndHeader(
                new Script(Script.GLOBAL_HEADER_FILE_NAME, "// script header\r\n", true),
                new Script(Script.GLOBAL_SCRIPT_FILE_NAME, "// global script\r\n", false));

            ((IList <ScriptAndHeader>)_scripts).Add(globalScript);
            _playerCharacter = null;

            for (int i = 0; i < _globalMessages.Length; i++)
            {
                _globalMessages[i] = string.Empty;
            }

            InitializeDefaultPalette();
        }
Esempio n. 2
0
        public Game()
        {
            _guis = new GUIFolders(GUIFolder.MAIN_GUI_FOLDER_NAME);
            _inventoryItems = new InventoryItemFolders(InventoryItemFolder.MAIN_INVENTORY_ITEM_FOLDER_NAME);
            _cursors = new List<MouseCursor>();
            _dialogs = new DialogFolders(DialogFolder.MAIN_DIALOG_FOLDER_NAME);
            _fonts = new List<Font>();
            _characters = new CharacterFolders(CharacterFolder.MAIN_CHARACTER_FOLDER_NAME);
            _plugins = new List<Plugin>();
            _translations = new List<Translation>();
            _rooms = new UnloadedRoomFolders(UnloadedRoomFolder.MAIN_UNLOADED_ROOM_FOLDER_NAME);
            _oldInteractionVariables = new List<OldInteractionVariable>();
            _settings = new Settings();
            _workspaceState = new WorkspaceState();
            _palette = new PaletteEntry[PALETTE_SIZE];
            _sprites = new SpriteFolder("Main");
            _views = new ViewFolders("Main");
            _audioClips = new AudioClipFolders("Main");
            _audioClipTypes = new List<AudioClipType>();
            _textParser = new TextParser();
            _lipSync = new LipSync();
            _propertySchema = new CustomPropertySchema();
            _globalVariables = new GlobalVariables();
            _globalMessages = new string[NUMBER_OF_GLOBAL_MESSAGES];
            _deletedViewIDs = new Dictionary<int, object>();
            _scripts = new ScriptFolders(ScriptFolder.MAIN_SCRIPT_FOLDER_NAME);
            _scriptsToCompile = new ScriptsAndHeaders();
            ScriptAndHeader globalScript = new ScriptAndHeader(
                new Script(Script.GLOBAL_HEADER_FILE_NAME, "// script header\r\n", true),
                new Script(Script.GLOBAL_SCRIPT_FILE_NAME, "// global script\r\n", false));
            ((IList<ScriptAndHeader>)_scripts).Add(globalScript);
            _playerCharacter = null;

            for (int i = 0; i < _globalMessages.Length; i++)
            {
                _globalMessages[i] = string.Empty;
            }

            InitializeDefaultPalette();
        }