示例#1
0
        public void Init(DialogReceiverInterface e, SceneDataControl scene, int areaIndex)
        {
            sceneRef           = scene;
            calledAreaIndexRef = areaIndex;

            string backgroundPath =
                Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[
                    GameRources.GetInstance().selectedSceneIndex].getPreviewBackground();

            backgroundPreviewTex = AssetsController.getImage(backgroundPath).texture;

            activeAreaTex   = (Texture2D)Resources.Load("Editor/ActiveArea", typeof(Texture2D));
            exitTex         = (Texture2D)Resources.Load("Editor/ExitArea", typeof(Texture2D));
            selectedAreaTex = (Texture2D)Resources.Load("Editor/SelectedArea", typeof(Texture2D));
            float bgwidth = backgroundPreviewTex.width * (600f / backgroundPreviewTex.height);

            imageBackgroundRect = new Rect(0f, 0f, bgwidth, 600);

            x      = sceneRef.getActiveAreasList().getActiveAreasList()[areaIndex].getX();
            y      = sceneRef.getActiveAreasList().getActiveAreasList()[areaIndex].getY();
            width  = sceneRef.getActiveAreasList().getActiveAreasList()[areaIndex].getWidth();
            heigth = sceneRef.getActiveAreasList().getActiveAreasList()[areaIndex].getHeight();

            base.Init(e, bgwidth, 600);
        }
    public override void Init(DialogReceiverInterface e)
    {
        elements          = Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenesIDs().Concat(Controller.getInstance().getSelectedChapterDataControl().getCutscenesList().getCutscenesIDs()).ToArray();
        selectedElementID = elements[0];

        base.Init(e);
    }
示例#3
0
        public override void Init(DialogReceiverInterface e)
        {
            elements          = Controller.getInstance().getSelectedChapterDataControl().getObjects <IChapterTarget>().ConvertAll(o => o.getId()).ToArray();
            selectedElementID = elements[0];

            base.Init(e);
        }
    public void Init(DialogReceiverInterface e, SceneDataControl scene, int areaIndex)
    {
        sceneRef           = scene;
        calledItemIndexRef = areaIndex;

        string backgroundPath =
            Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[
                GameRources.GetInstance().selectedSceneIndex].getPreviewBackground();

        backgroundPreviewTex =
            (Texture2D)Resources.Load(backgroundPath.Substring(0, backgroundPath.LastIndexOf(".")), typeof(Texture2D));

        selectedObjectTex = (Texture2D)Resources.Load("Editor/SelectedArea", typeof(Texture2D));

        imageBackgroundRect = new Rect(0f, 0f, backgroundPreviewTex.width, backgroundPreviewTex.height);

        objectsTex = new List <Sprite>();
        foreach (
            ElementContainer element in
            Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[
                GameRources.GetInstance().selectedSceneIndex].getReferencesList().getAllReferencesDataControl())
        {
            Debug.Log(element.getImage());
            objectsTex.Add(element.getImage());
        }

        base.Init(e, backgroundPreviewTex.width, backgroundPreviewTex.height);
    }
示例#5
0
        public void Init(DialogReceiverInterface e, string startTextContent, int exitIndex)
        {
            currentExitIndex = exitIndex;

            exitText = exitTextLast = Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[
                GameRources.GetInstance().selectedSceneIndex].getExitsList().getExitsList()[currentExitIndex]
                                      .getDefaultExitLook()
                                      .getExitText();

            exitIconPath         =
                exitIconPathLast = Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[
                    GameRources.GetInstance().selectedSceneIndex].getExitsList().getExitsList()[currentExitIndex]
                                   .getDefaultExitLook()
                                   .getCursorPath();

            audioPath         =
                audioPathLast = Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[
                    GameRources.GetInstance().selectedSceneIndex].getExitsList().getExitsList()[currentExitIndex]
                                .getDefaultExitLook()
                                .getSoundPath();

            clearTexture       = (Texture2D)Resources.Load("EAdventureData/img/icons/deleteContent", typeof(Texture2D));
            noAudioTexture     = (Texture2D)Resources.Load("EAdventureData/img/icons/noAudio", typeof(Texture2D));
            audioTexture       = (Texture2D)Resources.Load("EAdventureData/img/icons/audio", typeof(Texture2D));
            defaultExitTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/exit", typeof(Texture2D));

            if (exitIconPath != null && !exitIconPath.Equals(""))
            {
                exitTexture =
                    (Texture2D)Resources.Load(exitIconPath.Substring(0, exitIconPath.LastIndexOf(".")), typeof(Texture2D));
            }

            base.Init(e, startTextContent);
        }
示例#6
0
    public void Init(DialogReceiverInterface e, SceneDataControl scene, int exitIndex)
    {
        sceneRef           = scene;
        calledExitIndexRef = exitIndex;

        string backgroundPath =
            Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[
                GameRources.GetInstance().selectedSceneIndex].getPreviewBackground();

        backgroundPreviewTex =
            (Texture2D)Resources.Load(backgroundPath.Substring(0, backgroundPath.LastIndexOf(".")), typeof(Texture2D));

        activeAreaTex   = (Texture2D)Resources.Load("Editor/ActiveArea", typeof(Texture2D));
        exitTex         = (Texture2D)Resources.Load("Editor/ExitArea", typeof(Texture2D));
        selectedExitTex = (Texture2D)Resources.Load("Editor/SelectedArea", typeof(Texture2D));

        imageBackgroundRect = new Rect(0f, 0f, backgroundPreviewTex.width, backgroundPreviewTex.height);

        x           = sceneRef.getExitsList().getExitsList()[exitIndex].getX();
        y           = sceneRef.getExitsList().getExitsList()[exitIndex].getY();
        width       = sceneRef.getExitsList().getExitsList()[exitIndex].getWidth();
        heigth      = sceneRef.getExitsList().getExitsList()[exitIndex].getHeight();
        HALF_WIDTH  = (int)(0.5f * sceneRef.getExitsList().getExitsList()[calledExitIndexRef].getWidth());
        HALF_HEIGHT = (int)(0.5f * sceneRef.getExitsList().getExitsList()[calledExitIndexRef].getHeight());


        base.Init(e, backgroundPreviewTex.width, backgroundPreviewTex.height);
    }
示例#7
0
        public void Init(DialogReceiverInterface e, string cutsceneFilePath)
        {
            parent = e;

            windowWidth  = 800;
            windowHeight = 1000;

            cutscenePath = cutsceneFilePath;
            clearImg     = Resources.Load <Texture2D>("EAdventureData/img/icons/deleteContent");
            addTexture   = Resources.Load <Texture2D>("EAdventureData/img/icons/addNode");
            moveLeft     = Resources.Load <Texture2D>("EAdventureData/img/icons/moveNodeLeft");
            moveRight    = Resources.Load <Texture2D>("EAdventureData/img/icons/moveNodeRight");
            duplicateImg = Resources.Load <Texture2D>("EAdventureData/img/icons/duplicateNode");

            noBackgroundSkin  = Resources.Load <GUISkin>("EAdventureData/skin/EditorNoBackgroundSkin");
            selectedFrameSkin = Resources.Load <GUISkin>("EAdventureData/skin/EditorLeftMenuItemSkinConcreteOptions");

            transitionTypeName = new string[]
            {
                TC.get("NextScene.NoTransition"),
                TC.get("NextScene.TopToBottom"),
                TC.get("NextScene.BottomToTop"),
                TC.get("NextScene.LeftToRight"),
                TC.get("NextScene.RightToLeft"),
                TC.get("NextScene.FadeIn")
            };
            transitionTypeTexture = new Texture2D[]
            {
                Resources.Load <Texture2D>("EAdventureData/img/icons/transitionNone"),
                Resources.Load <Texture2D>("EAdventureData/img/icons/transitionVertical"),
                Resources.Load <Texture2D>("EAdventureData/img/icons/transitionReverseVertical"),
                Resources.Load <Texture2D>("EAdventureData/img/icons/transitionHorizontal"),
                Resources.Load <Texture2D>("EAdventureData/img/icons/transitionReverseHorizontal"),
                Resources.Load <Texture2D>("EAdventureData/img/icons/transitionFadein"),
            };

            Debug.Log(cutsceneFilePath);

            var incidences = new List <Incidence>();

            workingAnimation = Loader.LoadAnimation(cutsceneFilePath, Controller.ResourceManager, incidences) ?? new Animation(cutsceneFilePath, 40);

            imageChooser = new FileChooser
            {
                Empty    = SpecialAssetPaths.ASSET_EMPTY_IMAGE,
                FileType = FileType.FRAME_IMAGE,
                Label    = TC.get("Animation.Image")
            };

            soundChooser = new FileChooser
            {
                FileType = FileType.FRAME_MUSIC,
                Label    = TC.get("Animation.Sound")
            };

            // Initalize
            selectedFrame = -1;

            base.Init(e);
        }
示例#8
0
        public virtual void Init(DialogReceiverInterface e, FileType fType)
        {
            reference = e;
            fileType  = fType;

            OpenFileDialog();
        }
    public virtual void Init(DialogReceiverInterface e)
    {
        BaseChooseObjectPopup window = this;

        reference       = e;
        window.position = new Rect(Screen.width / 2 - 50, Screen.height / 2 - 150, 500, 100);
        window.Show();
    }
    public virtual void Init(DialogReceiverInterface e)
    {
        BaseCreatorPopup window = this;

        reference       = e;
        window.position = new Rect(Screen.width / 2 - windowWidth / 2, Screen.height / 2 - windowHeight / 2, windowWidth, windowHeight);
        window.Show();
    }
        public virtual void Init(DialogReceiverInterface e)
        {
            BaseInputPopup window = this;

            reference       = e;
            window.position = new Rect(Screen.width / 2 - 250, Screen.height / 2 - 150, 500, 300);
            window.ShowUtility();
        }
示例#12
0
 public void Init(DialogReceiverInterface e, object token, string title, string message, string defaultValue = null)
 {
     this.message      = message;
     this.value        = defaultValue;
     this.titleContent = new GUIContent(title);
     this.token        = token;
     this.Init(e);
 }
示例#13
0
 public void Init(DialogReceiverInterface e, object token, string title, string message, string[] elements)
 {
     this.titleContent = new GUIContent(title);
     this.message      = message;
     this.elements     = elements;
     this.token        = token;
     this.Init(e);
 }
示例#14
0
    public virtual void Init(DialogReceiverInterface e, FileType fType)
    {
        reference = e;
        fileType  = fType;
        ofd       = new System.Windows.Forms.OpenFileDialog();

        OpenFileDialog();
    }
    public virtual void Init(DialogReceiverInterface e, float width, float height)
    {
        BaseAreaEditablePopup window = this;

        reference       = e;
        window.position = new Rect(0, 0, width, height * 1.2f);
        window.Show();
    }
示例#16
0
    public virtual void Init(DialogReceiverInterface e, string startTextContent)
    {
        BaseInputPopup window = this;

        reference       = e;
        textContent     = startTextContent;
        window.position = new Rect(Screen.width / 2 - 250, Screen.height / 2 - 150, 500, 300);
        window.Show();
    }
        public void Init(DialogReceiverInterface e, string startTextContent, System.Object characterAnimType = null)
        {
            if (characterAnimType is CharactersWindowAppearance.CharacterAnimationType)
            {
                isCharacterCutscene = true;
                type = (CharactersWindowAppearance.CharacterAnimationType)characterAnimType;
            }

            base.Init(e, startTextContent);
        }
        public virtual void Init(DialogReceiverInterface e, string startTextContent)
        {
            ConfirmationDialog window = this;

            reference       = e;
            style           = new GUIStyle();
            style.fontStyle = FontStyle.Bold;

            question        = startTextContent;
            window.position = new Rect(Screen.width / 2 - 50, Screen.height / 2 - 150, 500, 100);
            window.Show();
        }
示例#19
0
        public override void Init(DialogReceiverInterface e)
        {
            if (elements == null)
            {
                elements    = new string[1];
                elements[0] = "None";
                okActive    = false;
            }

            selectedElementID = elements[0];

            base.Init(e);
        }
示例#20
0
        public override void Init(DialogReceiverInterface e)
        {
            elements = Controller.getInstance().getSelectedChapterDataControl().getAtrezzoList().getItemIDs();
            if (elements == null)
            {
                elements    = new string[1];
                elements[0] = "None";
                okActive    = false;
            }
            selectedElementID = elements[0];

            base.Init(e);
        }
    public override void Init(DialogReceiverInterface e)
    {
        flagsTex = (Texture2D)Resources.Load("EAdventureData/img/icons/flag16", typeof(Texture2D));
        varTex   = (Texture2D)Resources.Load("EAdventureData/img/icons/vars", typeof(Texture2D));

        flagContent = new GUIContent(TC.get("Flags.Title"), flagsTex);
        varContent  = new GUIContent(TC.get("Vars.Title"), varTex);

        selectedButtonSkin = (GUISkin)Resources.Load("Editor/ButtonSelected", typeof(GUISkin));
        noBackgroundSkin   = (GUISkin)Resources.Load("Editor/EditorNoBackgroundSkin", typeof(GUISkin));
        selectedAreaSkin   = (GUISkin)Resources.Load("Editor/EditorLeftMenuItemSkinConcreteOptions", typeof(GUISkin));

        contentRect         = new Rect(0f, 0.1f * windowHeight, windowWidth, 0.7f * windowHeight);
        addDeleteButtonRect = new Rect(0f, 0.8f * windowHeight, windowWidth, 0.15f * windowHeight);

        base.Init(e);
    }
    public void Init(DialogReceiverInterface e, SceneDataControl scene)
    {
        sceneRef = scene;

        string backgroundPath =
            Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[
                GameRources.GetInstance().selectedSceneIndex].getPreviewBackground();

        backgroundPreviewTex =
            (Texture2D)Resources.Load(backgroundPath.Substring(0, backgroundPath.LastIndexOf(".")), typeof(Texture2D));

        string playerPath =
            Controller.getInstance().getSelectedChapterDataControl().getPlayer().getPreviewImage();

        playerTex = (Texture2D)Resources.Load(playerPath.Substring(0, playerPath.LastIndexOf(".")), typeof(Texture2D));

        selectedPlayerTex = (Texture2D)Resources.Load("Editor/SelectedArea", typeof(Texture2D));

        editNodeTex       = (Texture2D)Resources.Load("EAdventureData/img/icons/nodeEdit", typeof(Texture2D));
        editSideTex       = (Texture2D)Resources.Load("EAdventureData/img/icons/sideEdit", typeof(Texture2D));
        setInitialNodeTex = (Texture2D)Resources.Load("EAdventureData/img/icons/selectStartNode", typeof(Texture2D));
        deleteTex         = (Texture2D)Resources.Load("EAdventureData/img/icons/deleteTool", typeof(Texture2D));
        deleteTex         = (Texture2D)Resources.Load("EAdventureData/img/icons/ScaleArea", typeof(Texture2D));

        initialNodeTex = (Texture2D)Resources.Load("EAdventureData/img/icons/selectStartNode", typeof(Texture2D));

        lineTex = (Texture2D)Resources.Load("Editor/LineTex", typeof(Texture2D));

        selectedAreaSkin = (GUISkin)Resources.Load("Editor/ButtonSelected", typeof(GUISkin));

        imageBackgroundRect = new Rect(0f, 0f, backgroundPreviewTex.width, backgroundPreviewTex.height);
        playerRect          = new Rect(0f, 0f, playerTex.width, playerTex.height);

        useTrajectory      = sceneRef.getTrajectory().hasTrajectory();
        useInitialPosition = useInitialPositionLast = !useTrajectory;
        trajectory         = sceneRef.getTrajectory().GetTrajectory();

        x = sceneRef.getDefaultInitialPositionX();
        y = sceneRef.getDefaultInitialPositionY();

        playerRect = new Rect(x, y, playerTex.width,
                              playerTex.height);

        base.Init(e, backgroundPreviewTex.width, backgroundPreviewTex.height);
    }
    public void Init(DialogReceiverInterface e, string cutsceneFilePath)
    {
        cutscenePath = cutsceneFilePath;
        clearImg     = (Texture2D)Resources.Load("EAdventureData/img/icons/deleteContent", typeof(Texture2D));
        addTexture   = (Texture2D)Resources.Load("EAdventureData/img/icons/addNode", typeof(Texture2D));
        moveLeft     = (Texture2D)Resources.Load("EAdventureData/img/icons/moveNodeLeft", typeof(Texture2D));
        moveRight    = (Texture2D)Resources.Load("EAdventureData/img/icons/moveNodeRight", typeof(Texture2D));
        duplicateImg = (Texture2D)Resources.Load("EAdventureData/img/icons/duplicateNode", typeof(Texture2D));

        animInfoRect        = new Rect(0f, 0.05f * windowHeight, windowWidth, 0.15f * windowHeight);
        timelineRect        = new Rect(0f, 0.25f * windowHeight, windowWidth, 0.3f * windowHeight);
        timelineButtonsRect = new Rect(0f, 0.50f * windowHeight, windowWidth, 0.1f * windowHeight);
        frameInfoRect       = new Rect(0f, 0.65f * windowHeight, windowWidth, 0.25f * windowHeight);
        buttonRect          = new Rect(0f, 0.9f * windowHeight, windowWidth, 0.1f * windowHeight);

        noBackgroundSkin  = (GUISkin)Resources.Load("Editor/EditorNoBackgroundSkin", typeof(GUISkin));
        selectedFrameSkin = (GUISkin)Resources.Load("Editor/EditorLeftMenuItemSkinConcreteOptions", typeof(GUISkin));

        //transitionTypes = new string []{ "None" , "Fade in", "Horizontal", "Vertical"};
        Debug.Log(cutsceneFilePath);

        workingAnimation = Loader.loadAnimation(AssetsController.InputStreamCreatorEditor.getInputStreamCreator(),
                                                cutsceneFilePath, new EditorImageLoader());

        Debug.Log(workingAnimation.getAboslutePath() + " " + workingAnimation.getFrames().Count + " " + workingAnimation.isSlides() + " " + workingAnimation.getId());
        if (workingAnimation == null)
        {
            workingAnimation = new Animation(cutsceneFilePath, 40, new EditorImageLoader());
        }

        // Initalize
        selectedFrame            = 0;
        documentationTextContent = workingAnimation.getFrames()[selectedFrame].getDocumentation();
        imagePath = workingAnimation.getFrames()[selectedFrame].getUri();
        soundPath = workingAnimation.getFrames()[selectedFrame].getSoundUri();
        animationDurationString          =
            animationDurationStringLast  = workingAnimation.getFrames()[selectedFrame].getTime().ToString();
        transitionDurationString         =
            transitionDurationStringLast = workingAnimation.getTransitions()[selectedFrame + 1].getTime().ToString();
        useTransitonFlag    = useTransitonFlagLast = workingAnimation.isUseTransitions();
        slidesAnimationFlag = slidesAnimationFlagLast = workingAnimation.isSlides();

        base.Init(e);
    }
示例#24
0
        public void Init(DialogReceiverInterface e, BookDataControl book)
        {
            bookRef = book;

            string backgroundPath = book.getPreviewImage();

            backgroundPreviewTex =
                (Texture2D)Resources.Load(backgroundPath.Substring(0, backgroundPath.LastIndexOf(".")), typeof(Texture2D));

            string leftNormalArrowPath = book.getArrowImagePath_WithDefault(BookDataControl.ARROW_LEFT,
                                                                            BookDataControl.ARROW_NORMAL);

            leftArrowTex =
                (Texture2D)
                Resources.Load(leftNormalArrowPath.Substring(0, leftNormalArrowPath.LastIndexOf(".")),
                               typeof(Texture2D));

            string rightNormalArrowPath = book.getArrowImagePath_WithDefault(BookDataControl.ARROW_RIGHT,
                                                                             BookDataControl.ARROW_NORMAL);

            rightArrowTex =
                (Texture2D)
                Resources.Load(rightNormalArrowPath.Substring(0, rightNormalArrowPath.LastIndexOf(".")),
                               typeof(Texture2D));

            imageBackgroundRect = new Rect(0f, 0f, backgroundPreviewTex.width, backgroundPreviewTex.height);

            defaultPreviousPageArrowPosition = new Vector2(MARGIN,
                                                           backgroundPreviewTex.height - leftArrowTex.height - MARGIN);
            defaultNextPageArrowPosition = new Vector2(backgroundPreviewTex.width - rightArrowTex.width - MARGIN,
                                                       backgroundPreviewTex.height - rightArrowTex.height - MARGIN);

            if (bookRef.getPreviousPagePosition() == Vector2.zero && bookRef.getNextPagePosition() == Vector2.zero)
            {
                SetDefaultArrowsPosition();
            }

            CalculateArrowsPosition();

            base.Init(e, backgroundPreviewTex.width, backgroundPreviewTex.height);
        }
示例#25
0
    public void Init(DialogReceiverInterface e, SceneDataControl scene, int areaIndex)
    {
        sceneRef = scene;
        calledBarrierIndexRef = areaIndex;

        string backgroundPath =
            Controller.getInstance().getSelectedChapterDataControl().getScenesList().getScenes()[
                GameRources.GetInstance().selectedSceneIndex].getPreviewBackground();

        backgroundPreviewTex =
            (Texture2D)Resources.Load(backgroundPath.Substring(0, backgroundPath.LastIndexOf(".")), typeof(Texture2D));

        barrierTex         = (Texture2D)Resources.Load("Editor/BarrierArea", typeof(Texture2D));
        selectedBarrierTex = (Texture2D)Resources.Load("Editor/SelectedArea", typeof(Texture2D));

        imageBackgroundRect = new Rect(0f, 0f, backgroundPreviewTex.width, backgroundPreviewTex.height);

        x      = sceneRef.getBarriersList().getBarriersList()[areaIndex].getX();
        y      = sceneRef.getBarriersList().getBarriersList()[areaIndex].getY();
        width  = sceneRef.getBarriersList().getBarriersList()[areaIndex].getWidth();
        heigth = sceneRef.getBarriersList().getBarriersList()[areaIndex].getHeight();

        base.Init(e, backgroundPreviewTex.width, backgroundPreviewTex.height);
    }
示例#26
0
 public virtual void Init(DialogReceiverInterface e, FileType fType)
 {
     fileFilter = "video files (*.mpg)|*.mpg";
     base.Init(e, fType);
 }
 public override void Init(DialogReceiverInterface e, FileType fType)
 {
     fileFilter = "asf,avi,dv,m4v,mov,mp4,mpg,mpeg,ogv,vp8,webm,wmv";
     base.Init(e, fType);
 }
示例#28
0
 public virtual void Init(DialogReceiverInterface e, FileType fType)
 {
     fileFilter = "image files (*.jpg, *.png, *.bmp)|*.jpg;*.png;*.bmp";
     base.Init(e, fType);
 }
 public override void Init(DialogReceiverInterface e, FileType fType)
 {
     fileFilter = "mp3";
     base.Init(e, fType);
 }
 public virtual void Init(DialogReceiverInterface e, FileType fType)
 {
     fileFilter = "JPG set of slides (*.eaa)|*.eaa";
     base.Init(e, fType);
 }