Beispiel #1
0
    // Start is called before the first frame update
    void Start()
    {
        if (deleteSaveGameOnStart)
        {
            SaveGame.GetInstance().Reset();
        }

        Localization.SetLanguage((Language)PlayerPrefs.GetInt("Language", 0));
        adventureMenu = GetComponent <AdventureMenu>();
        audioSource   = GetComponent <AudioSource>();
    }
Beispiel #2
0
    public static void Init()
    {
        thisWindowReference = EditorWindow.GetWindow(typeof(EditorWindowBase));
        windowWidth         = EditorWindow.focusedWindow.position.width;
        windowHeight        = EditorWindow.focusedWindow.position.height;
        buttonMenuRect      = new Rect(0.01f * windowWidth, 0.01f * windowHeight, windowWidth * 0.98f, windowHeight * 0.10f);
        leftMenuRect        = new Rect(0.01f * windowWidth, 0.12f * windowHeight, windowWidth * 0.14f, windowHeight * 0.87f);
        windowRect          = new Rect(0.16f * windowWidth, 0.12f * windowHeight, windowWidth * 0.83f, windowHeight * 0.85f);

        leftSubMenuSkin             = (GUISkin)Resources.Load("Editor/EditorLeftMenuItemSkin", typeof(GUISkin));
        leftSubMenuConcreteItemSkin =
            (GUISkin)Resources.Load("Editor/EditorLeftMenuItemSkinConcreteOptions", typeof(GUISkin));

        redoTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/redo", typeof(Texture2D));
        undoTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/undo", typeof(Texture2D));

        addTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/addNode", typeof(Texture2D));

        deleteImg    = (Texture2D)Resources.Load("EAdventureData/img/icons/deleteContent", typeof(Texture2D));
        duplicateImg = (Texture2D)Resources.Load("EAdventureData/img/icons/duplicateNode", typeof(Texture2D));

        sceneTexture        = (Texture2D)Resources.Load("EAdventureData/img/icons/scenes", typeof(Texture2D));
        cutsceneTexture     = (Texture2D)Resources.Load("EAdventureData/img/icons/cutscenes", typeof(Texture2D));
        bookTexture         = (Texture2D)Resources.Load("EAdventureData/img/icons/books", typeof(Texture2D));
        itemTexture         = (Texture2D)Resources.Load("EAdventureData/img/icons/items", typeof(Texture2D));
        setItemTexture      = (Texture2D)Resources.Load("EAdventureData/img/icons/Atrezzo-List-1", typeof(Texture2D));
        playerTexture       = (Texture2D)Resources.Load("EAdventureData/img/icons/player", typeof(Texture2D));
        characterTexture    = (Texture2D)Resources.Load("EAdventureData/img/icons/npcs", typeof(Texture2D));
        conversationTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/conversations", typeof(Texture2D));
        advancedTexture     = (Texture2D)Resources.Load("EAdventureData/img/icons/advanced", typeof(Texture2D));
        adaptationTexture   =
            (Texture2D)Resources.Load("EAdventureData/img/icons/adaptationProfiles", typeof(Texture2D));
        assessmentTexture =
            (Texture2D)Resources.Load("EAdventureData/img/icons/assessmentProfiles", typeof(Texture2D));

        thisWindowReference.Show();

        fileMenu          = new FileMenu();
        editMenu          = new EditMenu();
        adventureMenu     = new AdventureMenu();
        chaptersMenu      = new ChaptersMenu();
        runMenu           = new RunMenu();
        configurationMenu = new ConfigurationMenu();
        aboutMenu         = new AboutMenu();

        InitGUI();
    }