Пример #1
0
        public override void start()
        {
            GameObject objLayer = UIMgr.CreateLayer(layerNo);

            if (objLayer == null)
            {
                return;
            }

            objLayer.transform.parent.gameObject.SetActive(true);
            objLayer.SetActive(true);

            Object2D   info   = UIMgr.GetItemInfo(itemID);
            GameObject objPic = null;

            if (info != null)
            {
                objPic = info.gameObject;
            }
            else
            {
                objPic      = UIMgr.CreatePic(objLayer);
                objPic.name = itemID;
            }

            Object2D picShow = objPic.GetComponent <Object2D>();

            picShow.AddAction(this);

            this.isEnd = true;
        }
Пример #2
0
        public override void start()
        {
            //Debug.Log("Run Action : " + actID + " " + this.name);

            GameObject objLayer = UIMgr.CreateLayer(layer);

            if (objLayer == null)
            {
                return;
            }
            objLayer.SetActive(true);

            if (string.IsNullOrEmpty(assetID))
            {
                return;
            }

            Object2D   info   = UIMgr.GetItemInfo(itemID);
            GameObject objPic = null;

            if (info != null)
            {
                objPic = info.gameObject;
            }
            else
            {
                objPic      = UIMgr.CreatePic(objLayer);
                objPic.name = itemID;
            }

            info.AddAction(this);

            this.isEnd = true;
        }
Пример #3
0
        public override void start()
        {
            GameObject objLayer = UIMgr.CreateLayer(10);

            if (objLayer != null)
            {
                objLayer.SetActive(true);

                VideoFile theVideo = VideoMgr.CreateVideoPanel(movFile, objLayer);

                UnityEngine.Video.VideoClip clip = AssetLoader.Load <UnityEngine.Video.VideoClip>(movFile);
                theVideo.Play(clip);
            }

            this.isEnd = true;
        }
Пример #4
0
    Music _play_music_stream(string mediaName)
    {
        EventMgr.startEvent("显示关闭按钮");

        GameObject objLayer = UIMgr.CreateLayer(10);

        if (objLayer != null)
        {
            EditorPanel.Instance.gameObject.SetActive(false);
            StartCoroutine(LoadMusic(mediaName));
            //  VideoFile theVideo = VideoMgr.CreateVideoPanel("movie", objLayer);

            //  theVideo.playUrl(mediaName);
        }

        return(null);
    }
Пример #5
0
    void _play_movie_url()
    {
        EventMgr.startEvent("显示关闭按钮");

        GameObject objLayer = UIMgr.CreateLayer(10);

        if (objLayer != null)
        {
            VideoFile theVideo = VideoMgr.CreateVideoPanel("movie", objLayer);

            //  string movFile = System.Environment.CurrentDirectory + @"/姜子牙.mp4";
            //  string movFile = @"c:\迅雷下载\The.Eight.Hundred.2020.1080p.HDRip.x264.AC3-FEWAT.mp4";

            //VideoMgr.PlayUrl(@"h:\Movies\babes tracy lindsay and aiko may sexors.mp4");
            //  VideoMgr.PlayUrl(@"h:\Dolby\DOLBY.VISION.CES.March.2018.UHD.BDRemux.2160p.DV.IVA.ExKinoRay\02.Chameleon.mp4");
            // VideoMgr.PlayUrl("file://" + @Application.streamingAssetsPath + @"/姜子牙.mp4");

            string movFile = @System.Environment.CurrentDirectory + @"\Pinball-JDBBS.mp4";
            theVideo.playUrl(movFile);

            //EventMgr.startEvent("播放视频");
        }
    }
Пример #6
0
    public static void ShowList(LIST_TYPE newType)
    {
        listType = newType;
        Instance.objEditPanel.SetActive(true);

        int nCount = 0;

        switch (listType)
        {
        case LIST_TYPE.audio_Inner:
            nCount = audio.lisVideoRes.Count;
            foreach (string mediaName in audio.lisVideoRes)
            {
                Button button = EditorPanel.AddItem(mediaName);
                button.onClick.AddListener(() =>
                {
                    EventMgr.startEvent("显示关闭按钮");

                    GameObject objLayer = UIMgr.CreateLayer(10);
                    if (objLayer != null)
                    {
                        EditorPanel.Instance.gameObject.SetActive(false);

                        AudioClip clipMp3 = Resources.Load <AudioClip>("Media/" + mediaName);

                        Music music = MusicMgr.PlayMp3(clipMp3);
                        music.gameObject.AddComponent <_Astroid>();
                    }
                });
            }

            break;

        case LIST_TYPE.audio_Url:
            nCount = audio.lisVideoUrl.Count;
            foreach (string mediaName in audio.lisVideoUrl)
            {
                Button button = EditorPanel.AddItem(mediaName);
                button.onClick.AddListener(() =>
                {
                    EventMgr.startEvent("显示关闭按钮");

                    GameObject objLayer = UIMgr.CreateLayer(10);
                    if (objLayer != null)
                    {
                        EditorPanel.Instance.gameObject.SetActive(false);
                        VideoFile theVideo = VideoMgr.CreateVideoPanel("movie", objLayer);

                        theVideo.playUrl(mediaName);
                    }
                });
            }
            break;

        case LIST_TYPE.audio_Streaming:
            nCount = audio.lisVideoStreaming.Count;
            foreach (string mediaName in audio.lisVideoStreaming)
            {
                Button button = EditorPanel.AddItem(mediaName);
                button.onClick.AddListener(() =>
                {
                    EventMgr.startEvent("显示关闭按钮");

                    GameObject objLayer = UIMgr.CreateLayer(10);
                    if (objLayer != null)
                    {
                        EditorPanel.Instance.gameObject.SetActive(false);
                        Instance.StartCoroutine(Instance.LoadMusic(mediaName));
                        //  VideoFile theVideo = VideoMgr.CreateVideoPanel("movie", objLayer);

                        //  theVideo.playUrl(mediaName);
                    }
                });
            }
            break;

        case LIST_TYPE.video_Inner:
            nCount = video.lisVideoRes.Count;
            foreach (string mediaName in video.lisVideoRes)
            {
                Button button = EditorPanel.AddItem(mediaName);
                button.onClick.AddListener(() =>
                {
                    EventMgr.startEvent("显示关闭按钮");

                    GameObject objLayer = UIMgr.CreateLayer(10);
                    if (objLayer != null)
                    {
                        EditorPanel.Instance.gameObject.SetActive(false);
                        VideoFile theVideo = VideoMgr.CreateVideoPanel("movie", objLayer);

                        VideoClip videoClip = Resources.Load <VideoClip>("Media/" + mediaName);
                        theVideo.Play(videoClip);
                    }
                });
            }

            break;

        case LIST_TYPE.video_Url:
            nCount = video.lisVideoUrl.Count;
            foreach (string mediaName in video.lisVideoUrl)
            {
                Button button = EditorPanel.AddItem(mediaName);
                button.onClick.AddListener(() =>
                {
                    EventMgr.startEvent("显示关闭按钮");

                    GameObject objLayer = UIMgr.CreateLayer(10);
                    if (objLayer != null)
                    {
                        EditorPanel.Instance.gameObject.SetActive(false);
                        VideoFile theVideo = VideoMgr.CreateVideoPanel("movie", objLayer);

                        theVideo.playUrl(mediaName);
                    }
                });
            }
            break;

        case LIST_TYPE.video_Streaming:
            nCount = video.lisVideoStreaming.Count;
            foreach (string mediaName in video.lisVideoStreaming)
            {
                Button button = EditorPanel.AddItem(mediaName);
                button.onClick.AddListener(() =>
                {
                    EventMgr.startEvent("显示关闭按钮");

                    GameObject objLayer = UIMgr.CreateLayer(10);
                    if (objLayer != null)
                    {
                        EditorPanel.Instance.gameObject.SetActive(false);
                        VideoFile theVideo = VideoMgr.CreateVideoPanel("movie", objLayer);

                        theVideo.playUrl(mediaName);
                    }
                });
            }
            break;

        case LIST_TYPE.List_None:
            break;
        }
        Vector2 sz = EditorPanel.Instance.parent.GetComponent <RectTransform>().sizeDelta;

        sz.y += 20;
        sz.y  = nCount * 64;
        EditorPanel.Instance.parent.GetComponent <RectTransform>().sizeDelta = sz;
    }