Наследование: MonoBehaviour
Пример #1
0
        // GET: Movies/Download/5
        public async Task <IActionResult> Download(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var movie = await _context.Movie.FindAsync(id);

            if (movie == null)
            {
                return(NotFound());
            }

            await DownloadMovie(movie.FileS3Name, movie.FileName);

            ViewData["Message"] = "Successfully downloaded under " + downloadLocation;

            // var comments = _context.Comment.Where(c => _context.MovieComment.Any(mc => mc.CommentId == c.CommentId && mc.MovieId == movie.MovieId));
            var userComments = from comment in _context.Comment
                               join users in _context.Users on comment.UserId equals users.UserId
                               select new UserComments
            {
                CommentId = comment.CommentId,
                Content   = comment.Content,
                Rating    = comment.Rating,
                UserId    = comment.UserId,
                User      = users.UserName
            };
            PlayMovie playmovie = new PlayMovie();

            playmovie.movie        = movie;
            playmovie.userComments = userComments;
            return(View("PlayMovie", playmovie));
        }
Пример #2
0
    public static void PlayById(int id, Action callback = null, bool willDestroy = true)
    {
        var table = Table.GetStory(id);

        if (null != table)
        {
            if (0 == table.AnimType)
            {
                PlayMovie.Play(table.Path, callback, 1 == table.IsPassAnimation);
            }
            else
            {
                Instance.PlayCGFile(table.Path, callback, 1 == table.IsPassAnimation, willDestroy);
            }
            curPlayPath = table.Path;
            PlatformHelper.UMEvent("PlayCG", "play", table.Path);
        }
    }
Пример #3
0
    // Use this for initialization
    void Start()
    {
        gameControler = GetComponent <GameControler>();

        //partyNoteParent = GameObject.Find("PartyNote").transform;
        //enemyNoteParent = GameObject.Find("EnemyNote").transform;
        //それぞれの変数にオブジェクトを格納する
        //enemySliderのhpスクリプトを取得
        notes = GameObject.Find("enemySlider");
        hp    = notes.GetComponent <hp>();
        //CharaStatusスクリプトを取得
        CharaStatus = GetComponent <Charastatus>();
        //partyNoteのnoteスクリプトを取得
        partyNote = GameObject.Find("PartyNote");
        note      = partyNote.GetComponent <note>();
        //Frequencyスクリプト取得
        noteFrequency = partyNote.GetComponent <NoteFrequency>();
        //enemyNoteのenemynoteスクリプトを取得
        enemyNote = GameObject.Find("EnemyNote");
        enemynote = enemyNote.GetComponent <enemynote>();
        //ScenairoTextのScenarioTextスクリプトを取得
        text         = GameObject.Find("ScenarioText");
        scenarioText = text.GetComponent <ScenarioText>();
        //ScenarioCharaのScenarioCharaスクリプトを取得
        chara         = GameObject.Find("Image");
        scenarioChara = chara.GetComponent <ScinarioChara>();
        //BGMスタート
        audioSource = GetComponent <AudioSource>();
        if (BattleManager.Instance.nowBattleScene == 0)
        {
            return;
        }

        countDown = countDownText.GetComponent <CountDown>();
        StartCoroutine(countDown.CountdownCoroutine());

        tokagePlayMovie  = tokageEF.GetComponent <PlayMovie>();
        datyoPlayMovie   = datyoEF.GetComponent <PlayMovie>();
        momongaPlayMovie = momongaEF.GetComponent <PlayMovie>();
        kamePlayMovie    = kameEF.GetComponent <PlayMovie>();
        enemyPlayMovie   = enemyEF.GetComponent <PlayMovie>();
    }
Пример #4
0
        // GET: PlayMovie
        public async Task <IActionResult> Index(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var movie = await _context.Movie
                        .FirstOrDefaultAsync(m => m.MovieId == id);

            if (movie == null)
            {
                return(NotFound());
            }

            // IEnumerable<Comment> comments =  _context.Comment.Where(x => _context.MovieComment.Any(m => m.CommentId == x.CommentId && m.MovieId == movie.MovieId));

            var userComments = from comment in _context.Comment
                               join movieComment in _context.MovieComment on comment.CommentId equals movieComment.CommentId
                               where movieComment.MovieId == movie.MovieId
                               join users in _context.Users on comment.UserId equals users.UserId

                               select new UserComments
            {
                CommentId = comment.CommentId,
                Content   = comment.Content,
                Rating    = comment.Rating,
                UserId    = comment.UserId,
                User      = users.UserName
            };

            PlayMovie playMovieView = new PlayMovie();

            playMovieView.movie = movie;

            if (userComments != null)
            {
                playMovieView.userComments = userComments;
            }
            return(View("PlayMovie", playMovieView));
        }
Пример #5
0
    private void OpenPageByParam(CMDWebWindow.WebParam param)
    {
        global::Debug.Log("Tag :" + param.Tag);
        global::Debug.Log("URL :" + param.Url);
        string tag = param.Tag;

        switch (tag)
        {
        case "MoveGacha":
            if (GUIManager.CheckTopDialog("CMD_GashaTOP", null) == null)
            {
                this.ClosePanelNotEndShow(true);
                base.SetCloseAction(delegate(int i)
                {
                    if (this.callbackAction != null)
                    {
                        this.callbackAction();
                    }
                    GUIMain.BarrierOFF();
                    GUIMain.ShowCommonDialog(null, "CMD_GashaTOP", null);
                });
            }
            this.ClosePanel(true);
            break;

        case "MoveQuest":
            if (CMD_QuestSelect.instance == null)
            {
                this.ClosePanelNotEndShow(true);
                RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
                List <string> list = new List <string>();
                list.Add("1");
                list.Add("3");
                list.Add("8");
                ClassSingleton <QuestData> .Instance.GetWorldDungeonInfo(list, new Action <bool>(this.actCBQuest));
            }
            else
            {
                this.ClosePanel(true);
            }
            break;

        case "MoveExchange":
            if (GUIManager.CheckTopDialog("CMD_ClearingHouseTOP", null) == null)
            {
                this.ClosePanelNotEndShow(true);
                base.SetCloseAction(delegate(int i)
                {
                    if (this.callbackAction != null)
                    {
                        this.callbackAction();
                    }
                    GUIMain.BarrierOFF();
                    GUIMain.ShowCommonDialog(null, "CMD_ClearingHouseTOP", null);
                });
            }
            this.ClosePanel(true);
            break;

        case "ToggleBGM":
            this.ToggleBGM(false);
            break;

        case "Link":
            if (base.GetActionStatus() != CommonDialog.ACT_STATUS.CLOSING && base.GetActionStatus() != CommonDialog.ACT_STATUS.CLOSED)
            {
                string text = param.Url;
                text = this.DecodeUrl(text);
                if (CMDWebWindow.webViewObject != null)
                {
                    CMDWebWindow.webViewObject.Close();
                }
                this.StartWebView(ConstValue.APP_WEB_DOMAIN + text);
            }
            break;

        case "ExLink":
            Application.OpenURL(param.Url);
            break;

        case "PlayMovie":
        {
            this.isMute = false;
            this.ToggleBGM(true);
            PlayMovie component = base.GetComponent <PlayMovie>();
            component.actionFinishedMovie = new Action <bool>(this.ToggleBGM);
            NpMovie.TouchFinish           = true;
            NpMovie.SoundEnable           = true;
            NpMovie.ControllerEnabled     = false;
            string path = ConstValue.APP_ASSET_DOMAIN + this.DecodeUrl(param.Url);
            NpMovie.PlayStreaming(path, base.gameObject, component);
            break;
        }
        }
    }
Пример #6
0
    private void Update()
    {
#if !UNITY_EDITOR
        try
        {
#endif

#if UNITY_EDITOR
        if (Input.GetKeyDown(KeyCode.Alpha0))
        {
            EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.MissionTip, new MissionTipArguments(2)));
        }
        else if (Input.GetKeyDown(KeyCode.Minus))
        {
            if (UIManager.Instance.UiVisible(UIConfig.NewStrongUI))
            {
                EventDispatcher.Instance.DispatchEvent(new Close_UI_Event(UIConfig.NewStrongUI));
            }
            else
            {
                EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.NewStrongUI,
                                                                         new StrongArguments()));
            }
        }
        else if (Input.GetKeyDown(KeyCode.O))
        {
            EventDispatcher.Instance.DispatchEvent(new UIEvent_FixIphoneX(-1));
        }
        else if (Input.GetKeyDown(KeyCode.P))
        {
            EventDispatcher.Instance.DispatchEvent(new UIEvent_FixIphoneX(1));
        }
        else if (Input.GetKeyDown(KeyCode.Comma))
        {
        }
        else if (Input.GetKeyDown(KeyCode.F1))
        {
            //GuideManager.Instance.StopGuiding();
            //GuideManager.Instance.StartGuide(1);
        }
        else if (Input.GetKeyDown(KeyCode.F2))
        {
            PlayCG.Instance.PlayCGFile(VideoFile);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha1))
        {
            int[] Test = { 10000, 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 10009, 10010, 10011 };
            EventDispatcher.Instance.DispatchEvent(new Event_AchievementTip(Test[UnityEngine.Random.RandomRange(0, Test.Length)]));
        }
        else if (Input.GetKeyDown(KeyCode.Alpha2))
        {
            MissionManager.Instance.StartDialog(90);

//			MissionManager.Instance.ChangedSceneByMission(200, 17);
//          var arg = new StoreArguments() { Type = 14 };
//          Show_UI_Event e = new Show_UI_Event(UIConfig.CustomShopFrame, arg);
//          EventDispatcher.Instance.DispatchEvent(e);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha9))
        {
            GameUtils.GotoUiTab(19, 1);
//             var arg = new StoreArguments() { Type  = 104};
//             Show_UI_Event e = new Show_UI_Event(UIConfig.StoreEquip, arg);
//             EventDispatcher.Instance.DispatchEvent(e);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha8))
        {
            //EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.AcientBattleFieldFrame));
            //GameUtils.GotoUiTab(19, 0);
            var e = new Show_UI_Event(UIConfig.DungeonResult, new DungeonResultArguments
            {
                FubenId   = 6,
                Second    = 100,
                DrawId    = 0,
                DrawIndex = 1,
                EraId     = 1
            });
            EventDispatcher.Instance.DispatchEvent(e);
//             var arg = new CharacterArguments() {Tab = -1};
//             Show_UI_Event e = new Show_UI_Event(UIConfig.CharacterUI,arg);
//             EventDispatcher.Instance.DispatchEvent(e);
//             var arg = new EquipUIArguments() { Tab = 1 };
//             var e = new Show_UI_Event(UIConfig.EquipUI, arg);
//             EventDispatcher.Instance.DispatchEvent(e);
//             var e = new Show_UI_Event(UIConfig.BattleResult, new BattleResultArguments
//             {
//                 DungeonId = 2000,
//                 BattleResult = 1,
//                 First = 0
//             });
//             EventDispatcher.Instance.DispatchEvent(e);
//             SkillEquipMainUiAnime e = new SkillEquipMainUiAnime(4,1);
//             EventDispatcher.Instance.DispatchEvent(e);

//             var objId = ObjManager.Instance.MyPlayer.GetObjId();
//             PlayerDataManager.Instance.ApplyCharacterSimpleInfo(objId, (PlayerInfoMsg info) =>
//             {
//                 Show_UI_Event e = new Show_UI_Event(UIConfig.PlayerInfoUI, info);
//                 EventDispatcher.Instance.DispatchEvent(e);
//             });
            //EventDispatcher.Instance.DispatchEvent(new ShowUIHintBoard("asdfasdf"));
            //EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.EquipInfoUI, 210407));
        }
        else if (Input.GetKeyDown(KeyCode.Alpha7))
        {
            UIManager.Instance.DestoryCloseUi();
//             TestChat = new ChatMessageDataModel()
//             {
//                 Type = (int)eChatChannel.World,
//                 Content = "",
//                 SoundData = new byte[]{},
//                 Name = "asdf",
//                 CharId = 0ul,
//             };
//             EventDispatcher.Instance.DispatchEvent(new Event_PushMessage(TestChat));
//             EventDispatcher.Instance.DispatchEvent(e);
//            GameUtils.ShowHintTip("adfasdfefe");
//             P1vP1Change_One one = new P1vP1Change_One();
//             one.Type = 0;
//             one.NewRank = 101;
//             one.OldRank = 102;
//             one.Name = "adfdsf";
//             ArenaFightRecoardChange e = new ArenaFightRecoardChange(one);
//             EventDispatcher.Instance.DispatchEvent(e);
//            UIManager.Instance.ShowBlockLayer();
//             var d = new WingArguments();
//             d.Tab = 1;
//             Show_UI_Event e = new Show_UI_Event(UIConfig.WingUI,d);
//             EventDispatcher.Instance.DispatchEvent(e);
//             Show_UI_Event e = new Show_UI_Event(UIConfig.BattleUI);
//             EventDispatcher.Instance.DispatchEvent(e);
            var e1 = new ChatMainHelpMeesage("asdfasdfasdf");
            EventDispatcher.Instance.DispatchEvent(e1);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha6))
        {
//             BuffResult result = new BuffResult();
//             result.Type = BuffType.HT_REBOUND;
//             result.Damage = 100;
//             result.TargetObjId = ObjManager.Instance.MyPlayer.GetObjId();
//             var e = new ShowDamageBoardEvent(ObjManager.Instance.MyPlayer.Position, result);
//             EventDispatcher.Instance.DispatchEvent(e);
//             TestChat.Content = "adsfadsfasfdeasdfeadsfeadfe";
//             EventDispatcher.Instance.DispatchEvent(new ChatVoiceContent(TestChat));
            //UIManager.Instance.ShowBlockLayer(1);
//             var d = new WingArguments();
//             d.Tab = 0;
//             Show_UI_Event e = new Show_UI_Event(UIConfig.WingUI,d);
//             EventDispatcher.Instance.DispatchEvent(e);
            // EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.BattleUnionUI));

            //UIManager.Instance.RemoveBlockLayer();
            GameUtils.GotoUiTab(92, -1, Item);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha5))
        {
            UIManager.Instance.ShowBlockLayer();
//            UIManager.Instance.ShowMessage(MessageBoxType.Ok, "adffd","adsfasdf");
/*            UIManager.Instance.RemoveBlockLayer();*/
//             var d = new ComposeArguments();
//             d.Tab = 102;
//             Show_UI_Event e = new Show_UI_Event(UIConfig.ComposeUI, d);
//             EventDispatcher.Instance.DispatchEvent(e);
            //EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.AstrologyUI));
        }
        else if (Input.GetKeyDown(KeyCode.Alpha4))
        {
//             Show_UI_Event e = new Show_UI_Event(UIConfig.ReliveUI, Game.Instance.ServerTime.AddSeconds(60));
//                         EventDispatcher.Instance.DispatchEvent(e);
//                         var list = new List<int> { 100, 0, 1 };
//                         EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.DungeonResult, list));
//            NetManager.Instance.StartCoroutine(TestNetCoroutine());
//             var d = new CharacterArguments();
//             d.Tab = 0;
//             Show_UI_Event e = new Show_UI_Event(UIConfig.CharacterUI, d);
//             EventDispatcher.Instance.DispatchEvent(e);
// //             SkillEquipMainUiAnime e = new SkillEquipMainUiAnime(4, 0);
//              EventDispatcher.Instance.DispatchEvent(e);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha3))
        {
            if (!string.IsNullOrEmpty(MoviePath))
            {
                PlayMovie.Play(MoviePath);
            }
        }
        else if (Input.GetKeyDown(KeyCode.F3))
        {
            Game.Instance.ExitToSelectRole();
        }
        else if (Input.GetKeyDown(KeyCode.F4))
        {
            if (null != DebugHelper.helperInstance)
            {
                var console = DebugHelper.helperInstance.GetComponent <DevConsole.Console>();
                console.PrintInput("!!SpeedSet,300");
            }
        }
        else if (Input.GetKeyDown(KeyCode.F5))
        {
            Game.Instance.ExitToLogin();
        }
        else if (Input.GetKeyDown(KeyCode.F6))
        {
            var args = new UIInitArguments();
            args.Args = new List <int>();
            EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.EraAchievementUI, args));
//             EventDispatcher.Instance.DispatchEvent(new System_Notice_Event("1196306"));
        }
        else if (Input.GetKeyDown(KeyCode.F7))
        {
            var args = new UIInitArguments();
            args.Args = new List <int>();
            args.Args.Add(1);
            EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.EraGetNoticeUI, args));

            //ObjManager.Instance.MyPlayer.PopTalk("fdasfdsafdsa");
        }
        else if (Input.GetKeyDown(KeyCode.F8))
        {
            EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.OperationActivityFrame));
        }
        else if (Input.GetKeyDown(KeyCode.F9))
        {
            //GameUtils.GotoUiTab(80, 0);
            var player = ObjManager.Instance.MyPlayer;
            PlayerDataManager.Instance.mInitBaseAttr.ModelId = 700;
            if (player == null)
            {
                return;
            }
            player.ModelId = 700;
        }
        else if (Input.GetKeyDown(KeyCode.F10))
        {
            var player = ObjManager.Instance.MyPlayer;
            PlayerDataManager.Instance.mInitBaseAttr.ModelId = -1;
            if (player == null)
            {
                return;
            }
            player.ModelId = -1;
            //EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.P1VP1Frame));
        }
        else if (Input.GetKeyDown(KeyCode.Home))
        {
            if (btest == false)
            {
                var e = new Show_UI_Event(UIConfig.CharacterUI);
                EventDispatcher.Instance.DispatchEvent(e);
            }
            else
            {
                var e = new Close_UI_Event(UIConfig.CharacterUI);
                EventDispatcher.Instance.DispatchEvent(e);
            }
            btest = !btest;
        }
        else if (Input.GetKeyDown(KeyCode.End))
        {
            PlayerDataManager.Instance.HoldLode(242010);
        }
        else if (Input.GetKeyDown(KeyCode.PageDown))
        {
            EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.FieldMineUI));
        }
        else if (Input.GetKeyDown(KeyCode.Backspace))
        {
            //    var arg = new SmithyFrameArguments();
            //    arg.Tab = 1;
            //    arg.BuildingData = CityManager.Instance.BuildingDataList[0];
            //    var e = new Show_UI_Event(UIConfig.SmithyUI, arg);
            //    EventDispatcher.Instance.DispatchEvent(e);
            EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.ChickenFightUI));
        }
        else if (Input.GetKeyDown(KeyCode.Keypad0))
        {
            PlayerDataManager.Instance.InputControlHPEffect = true;
        }
        else if (Input.GetKeyDown(KeyCode.Keypad1))
        {
            PlayerDataManager.Instance.InputControlHPEffect = false;
        }
        else if (Input.GetKeyDown(KeyCode.Keypad2))
        {
            EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.FieldFinalUI));
        }
#endif

#if UNITY_STANDALONE
        Vector2 v = new Vector2();
        if (Input.GetKey(KeyCode.W))
        {
            v.y = 1;
        }
        if (Input.GetKey(KeyCode.A))
        {
            v.x = -1;
        }
        if (Input.GetKey(KeyCode.S))
        {
            v.y = -1;
        }
        if (Input.GetKey(KeyCode.D))
        {
            v.x = 1;
        }
        if (v.x != 0 || v.y != 0)
        {
            MoveDirection(v);
        }
        if (Input.GetKeyUp(KeyCode.J))
        {
            OnClickEvent(0, -1);
        }
        else
        {
            int idx = -1;
            if (Input.GetKeyUp(KeyCode.U))
            {
                idx = 0;
            }
            else if (Input.GetKeyUp(KeyCode.I))
            {
                idx = 1;
            }
            else if (Input.GetKeyUp(KeyCode.O))
            {
                idx = 2;
            }
            else if (Input.GetKeyUp(KeyCode.P))
            {
                idx = 3;
            }
            var skill = PlayerDataManager.Instance.PlayerDataModel.SkillData.EquipSkills;
            if (null != skill && idx >= 0 && idx < skill.Count)
            {
                OnClickEvent(1, skill[idx].SkillId);
            }
        }
#endif
        Executer.Update();


#if !UNITY_EDITOR
    }

    catch (Exception ex)
    {
        Logger.Error(ex.ToString());
    }
#endif
    }
Пример #7
0
 void Awake()
 {
     background = GameObject.FindGameObjectWithTag("Background").GetComponent <PlayMovie>();
 }
Пример #8
0
 void Start()
 {
     movie = screen.GetComponent <PlayMovie>();
     state = GetComponent <StateMachineState>();
 }