예제 #1
0
    protected override void InitDatas()
    {
        base.InitDatas();

        //< 컷씬 정보 미리 로드
        CutSceneMgr.LoadCutScene();
    }
예제 #2
0
    public void OverrideGameEnd(bool isSuccess)
    {
        if (SingleGameState.IsTest)
        {
            SceneManager.instance.ActionEvent(_ACTION.GO_TOWN);
            SingleGameState.IsTest = false;
        }

        if (isSuccess)
        {
            if (UiState == 1)//넷트워크에서 처리가 잘됨. 좋은거
            {
#if UNITY_EDITOR
                if (SceneManager.instance.testData.bCutSceneTest && GameObject.Find("CinemaSceneManager") != null)
                {
                    CinemaSceneManager csm = GameObject.Find("CinemaSceneManager").GetComponent <CinemaSceneManager> ();

                    SingleGameInfo stageinfo     = (SingleGameInfo)G_GameInfo.GameInfo;
                    bool           bPlayCutScene = false;
                    if (csm.getCinemaSceneStartTypeByStageID(stageinfo.StageId) == CinemaSceneManager.StartType.AFTER_CLEAR)
                    {
                        bPlayCutScene = true;
                    }
                    if (stageinfo.StageId == 310)                      // 3-10 has two conditions, BEFORE_GAME_START and AFTER_CLEAR,
                    {
                        if (csm.getCinemaSceneStartTypeByStageID(stageinfo.StageId) == CinemaSceneManager.StartType.BEFORE_GAME_START)
                        {
                            bPlayCutScene = true;
                        }
                    }

                    if (bPlayCutScene)
                    {
                        int idx = 0;
                        if (stageinfo.StageId == 310)
                        {
                            idx = 2;
                        }
                        CutSceneMgr.StartCinemaScene(false, idx, idx, () => {
                            OpenResultPanel(true);
                        });
                        return;
                    }
                }
#endif
                OpenResultPanel(true);
            }
            else//클라가 먼저 실행됨 네트워크에서 처리.
            {
                UiState = 2;
            }
        }
        else
        {
            UiState = 2;
            NetworkClient.instance.SendPMsgStageCompleteC((int)StageId, 0, new int[] { 0, 0, 0 });
        }
    }
예제 #3
0
    protected override void InitDatas()
    {
        //_STATE state = SceneManager.instance.CurrState();

        base.InitDatas();

        //< 컷씬 정보 미리 로드
        CutSceneMgr.LoadCutScene();
    }
예제 #4
0
    Vector3 GetUIPos()
    {
        if (CutSceneEvent)
        {
            return(CutSceneMgr.WorldToUIPosition(Owner.transform.position + offset) * screenWScale);
        }

        return(MathHelper.WorldToUIPosition(Owner.transform.position + offset) * screenWScale);
    }
예제 #5
0
    protected override void InitDatas()
    {
        base.InitDatas();

        //< 컷씬 정보 미리 로드
        CutSceneMgr.LoadCutScene();

        if (!TutorialGameState.IsTutorial)
        {
            return;
        }
    }
예제 #6
0
 void Awake()
 {
     //Implement as singleton to ensure only 1 in the scene
     if (CutSceneMgr._instance != null && CutSceneMgr._instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         CutSceneMgr._instance = this;
     }
 }
예제 #7
0
    public void CutSceneCamShakeSlowAndFinish(float _effectTime)
    {
        CameraManager.instance.cutSceneCamShake();
        startSlowEffect(_effectTime);
        TempCoroutine.instance.FrameDelay(_effectTime, () => {
            Time.timeScale = GameDefine.DefaultTimeScale;

            if (SceneManager.instance.testData.bSingleSceneTestStart && SceneManager.instance.testData.bQuestTestStart)
            {
                Time.timeScale = 5f;
            }
            CutSceneMgr.stopBossCutScene();
        });
    }
예제 #8
0
    public static bool DisableHit = false; //애도  Unit TakeDamage에서 임시로 사용하고 있는 거 같다.
    //private GameObject[] ActionCam;//처음 시작연출용 카메라 2대

    protected override void InitDatas()
    {
        base.InitDatas();

        //< 컷씬 정보 미리 로드
        CutSceneMgr.LoadCutScene();

        //ActionCam = new GameObject[] {
        //    GameObject.Find("LeftCam"),
        //    GameObject.Find("RightCam")
        //};

        //ActionCam[0].SetActive(false);
        //ActionCam[1].SetActive(false);
    }
    public static bool DisableHit = false; //애도  Unit TakeDamage에서 임시로 사용하고 있는 거 같다.

    protected override void InitDatas()
    {
        base.InitDatas();

        //< 컷씬 정보 미리 로드
        CutSceneMgr.LoadCutScene();

        //if (FreeFightGameState.GameMode == GAME_MODE.FREEFIGHT)
        //{
        //    DungeonTable.FreefightTableInfo freeInfo = _LowDataMgr.instance.GetLowDataFreeFight(FreeFightGameState.StageName);
        //    if (freeInfo !=null && 4 <= freeInfo.SafetyZone.list.Count)
        //    {
        //        SafetyZone.x = float.Parse(freeInfo.SafetyZone.list[0]);
        //        SafetyZone.y = float.Parse(freeInfo.SafetyZone.list[1]);
        //        SafetyZone.z = float.Parse(freeInfo.SafetyZone.list[2]);
        //        SafetyZone.w = float.Parse(freeInfo.SafetyZone.list[3]);
        //    }
        //}
    }
    void Update()
    {
        if (bossUnit != null)
        {
            if (bossUnit.CharInfo.Hp < bossUnit.CharInfo.MaxHp / 2)
            {
                QuestInfo questInfo = QuestManager.instance.GetLastestUnCompleteQuestInfo();

                if (questInfo != null && getCinemaSceneStartType(questInfo.unTaskId) == CinemaSceneManager.StartType.DURING_BATTLE)
                {
                    if (eventCnt == 0)
                    {
                        eventCnt = 1;
                        int startSeqIdx = getCinemaSceneStartingSeqIndex(questInfo.unTaskId);
                        int endSeqIdx   = getCinemaSceneEndingSeqIndex(questInfo.unTaskId);
                        CutSceneMgr.StartCinemaScene(true, startSeqIdx, endSeqIdx, null);
                    }
                }
#if UNITY_EDITOR
                else
                {
                    if (SceneManager.instance.testData.bCutSceneTest)
                    {
                        SingleGameInfo stageinfo = (SingleGameInfo)G_GameInfo.GameInfo;

                        CinemaSceneManager csm = GameObject.Find("CinemaSceneManager").GetComponent <CinemaSceneManager> ();
                        if (csm.getCinemaSceneStartTypeByStageID(stageinfo.StageId) == CinemaSceneManager.StartType.DURING_BATTLE)
                        {
                            if (eventCnt == 0)
                            {
                                eventCnt = 1;
                                int startSeqIdx = getCinemaSceneStartingSeqIndex(questInfo.unTaskId);
                                int endSeqIdx   = getCinemaSceneEndingSeqIndex(questInfo.unTaskId);
                                CutSceneMgr.StartCinemaScene(true, startSeqIdx, endSeqIdx, null);
                            }
                        }
                    }
                }
#endif
            }
        }
    }
예제 #11
0
    public void Preload()
    {
        GameObject npcGo = G_GameInfo.GameInfo.SpawnNpc((uint)unitId, teamType, GroupNo, transform.position, transform.rotation, isBoss, isMiddleBoss);

        spawnedGO          = npcGo.GetComponent <Npc>();
        spawnedGO.spawnner = this as ISpawner;
        spawnedGO.SetNpcPostingInfo((uint)UnitNum);

        //< 숨겨놓음
        spawnedGO.gameObject.SetActive(false);

        //< 컷씬 이벤트에 들어갈 타겟일경우 추가해준다.
        if (isBoss)
        {
            CutSceneMgr.AddCutSceneEventTarget(npcGo, 0);
            if (CinemaSceneManager.instance != null)
            {
                CinemaSceneManager.instance.setBossUnit(npcGo);
            }
        }
    }
예제 #12
0
    public void OverrideGameStart(uint questID)
    {
        //QuestInfo quest = QuestManager.instance.GetLastQuestInfo();
        prevQuestID = questID;
        if (GameObject.Find("CinemaSceneManager") != null)
        {
            CinemaSceneManager csm = GameObject.Find("CinemaSceneManager").GetComponent <CinemaSceneManager> ();

            if (csm.getCinemaSceneStartType(questID) == CinemaSceneManager.StartType.BEFORE_GAME_START)
            {
                int startSeqIdx = csm.getCinemaSceneStartingSeqIndex(questID);
                int endSeqIdx   = csm.getCinemaSceneEndingSeqIndex(questID);
                CutSceneMgr.StartCinemaScene(true, startSeqIdx, endSeqIdx, () => {
                    HudPanel.Show();
                    GameStart();
                });
                return;
            }
        }

        HudPanel.Show();
        GameStart();
    }
예제 #13
0
 public void FinishCutScene()
 {
     CutSceneMgr.stopBossCutScene();
 }
        IEnumerator EventUpdate(CutSceneEventData __CutSceneEventData)
        {
            List <CutSceneEventDataList> EventList = new List <CutSceneEventDataList>();

            for (int i = 0; i < __CutSceneEventData.EventList.Length; i++)
            {
                EventList.Add(__CutSceneEventData.EventList[i]);
            }

            int DefaultIdx = -1;

            for (int i = 0; i < EventList.Count; i++)
            {
                if (EventList[i].ActionType == eCutSceneEvent.SetRaidStartDefault)
                {
                    DefaultIdx = i;
                    break;
                }
            }

            if (DefaultIdx != -1)
            {
                EventList.Insert(DefaultIdx + 1, CreateCutSceneEventDataList(eCutSceneEvent.StartUpdate, Vector3.zero));
                EventList.Insert(DefaultIdx + 1, CreateCutSceneEventDataList(eCutSceneEvent.SetRaidDefaultPos, Vector3.zero));
                EventList.Insert(DefaultIdx + 1, CreateCutSceneEventDataList(eCutSceneEvent.SetFadeOut, Vector3.zero));
                EventList.Insert(DefaultIdx + 1, CreateCutSceneEventDataList(eCutSceneEvent.StopUpdate, Vector3.zero));
            }

            Unit unit = null;

            for (int i = 0; i < EventList.Count; i++)
            {
                //Debug.Log("EventList ActionType " + EventList[i].ActionType);
                switch (EventList[i].ActionType)
                {
                    #region 이전데이터

                //< 카메라 포커싱처리
                case eCutSceneEvent.Focusing:
                    if (EventList[i].ActionBool)
                    {
                        if (G_GameInfo.GameInfo.FocusingCam != null)
                        {
                            G_GameInfo.GameInfo.FocusingCam.StartEffect(0, true);
                        }
                    }
                    else
                    {
                        if (G_GameInfo.GameInfo.FocusingCam != null && G_GameInfo.GameInfo.FocusingCam.gameObject.activeSelf)
                        {
                            G_GameInfo.GameInfo.FocusingCam.EndEffect(true);
                        }
                    }
                    break;

                //< 사운드 실행
                case eCutSceneEvent.PlayBgmSound:
                    //SoundHelper.PlayBgmSound((uint)EventList[i].ActionValue);
                    break;

                //< 보스 UI 출력
                case eCutSceneEvent.ShowBossUI:
                    if (null == UIMgr.GetUI("InGame/BossCutscenePanel"))
                    {
                        UIMgr.Open("InGame/BossCutscenePanel", EventList[i].ActionValue);
                    }
                    break;

                //< 기본 셋트 한번에 다해줌
                case eCutSceneEvent.SetDefaultBoss:

                    //< 포커싱처리
                    G_GameInfo.GameInfo.FocusingCam.StartEffect(0, true);

                    //< 사운드실행
                    //SoundHelper.PlayBgmSound(9008);

                    unit = CutSceneMgr.CutSceneEventDic[0].GetComponent <Unit>();

                    G_GameInfo.GameInfo.FocusingCam.AddObject(unit.gameObject);

                    //< 보스 유아이 실행
                    //if (null == UIMgr.GetUI("InGame/BossCutscenePanel"))
                    //    UIMgr.Open("InGame/BossCutscenePanel", (float)3);

                    //< 해당 애니메이션 플레이 시간을 얻는다.
                    eAnimName aniName2 = GetAniName("Anim_intro");
                    if (aniName2 != eAnimName.Anim_idle)
                    {
                        EventList[i].ActionDelay = unit.Animator.GetAnimLength(aniName2) + 1;
                    }

                    //EventList[i].ActionDelay += unit.Animator.GetAnimLength(eAnimName.Anim_special);

                    Sequence.Duration = EventList[i].ActionDelay + 0.5f;
                    USTimelineProperty Infolist = Sequence.GetComponentInChildren <USTimelineProperty>();
                    //CutSceneMgr.seq.Duration=EventList[i].ActionDelay+0.5f;

                    //UI 라이트를 컨트롤 한다. 다시 켜주는 건 CutSceneMgr 에 있음. EndScene 마지막
                    Transform Shadow;
                    Shadow = GameObject.Find("UI_ShadowLight").GetComponent <Transform> ();
                    USTimelineContainer Container = Sequence.CreateNewTimelineContainer(Shadow);
                    GameObject          test      = new GameObject("Evnet Timeline");
                    test.transform.parent = Container.transform;
                    Component Evnt = test.AddComponent("USTimelineEvent");

                    GameObject First  = new GameObject("USEnableComponentEvent");
                    GameObject Second = new GameObject("USEnableComponentEvent");

                    First.transform.parent  = Evnt.transform;
                    Second.transform.parent = Evnt.transform;

                    First.AddComponent("USEnableComponentEvent");
                    Second.AddComponent("USEnableComponentEvent");
                    First.GetComponent <USEnableComponentEvent> ().ComponentName = "Light";
                    //Second.GetComponent<USEnableComponentEvent> ().ComponentName = "Light";
                    //Second.GetComponent<USEnableComponentEvent> ().enableComponent=true;

                    First.GetComponent <USEnableComponentEvent> ().FireTime = 0.0f;
                    //Second.GetComponent<USEnableComponentEvent> ().FireTime = Sequence.Duration;
                    //

                    Infolist.Properties [0].curves [0].Keys[1].Time  = 0.7f;
                    Infolist.Properties [0].curves [1].Keys [1].Time = 0.7f;
                    Infolist.Properties [0].curves [2].Keys [1].Time = 0.7f;
                    Infolist.Properties [1].curves [0].Keys[1].Time  = 0.7f;
                    Infolist.Properties [1].curves [1].Keys [1].Time = 0.7f;
                    Infolist.Properties [1].curves [2].Keys [1].Time = 0.7f;
                    Infolist.Properties [1].curves [3].Keys [1].Time = 0.7f;

                    Infolist.Properties [0].curves [0].Keys[3].Time  = Sequence.Duration + 10;
                    Infolist.Properties [0].curves [1].Keys [3].Time = Sequence.Duration + 10;
                    Infolist.Properties [0].curves [2].Keys [3].Time = Sequence.Duration + 10;
                    Infolist.Properties [1].curves [0].Keys[3].Time  = Sequence.Duration + 10;
                    Infolist.Properties [1].curves [1].Keys [3].Time = Sequence.Duration + 10;
                    Infolist.Properties [1].curves [2].Keys [3].Time = Sequence.Duration + 10;
                    Infolist.Properties [1].curves [3].Keys [3].Time = Sequence.Duration + 10;

                    Infolist.Properties [0].curves[0].Keys[2].Time   = Sequence.Duration;
                    Infolist.Properties [0].curves [1].Keys [2].Time = Sequence.Duration;
                    Infolist.Properties [0].curves [2].Keys [2].Time = Sequence.Duration;
                    Infolist.Properties [1].curves [0].Keys[2].Time  = Sequence.Duration;
                    Infolist.Properties [1].curves [1].Keys [2].Time = Sequence.Duration;
                    Infolist.Properties [1].curves [2].Keys [2].Time = Sequence.Duration;
                    Infolist.Properties [1].curves [3].Keys [2].Time = Sequence.Duration;

                    break;


                    #endregion 이전데이터

                //< 해당 위치로 강제이동
                case eCutSceneEvent.ImmediatelyMove:
                    CutSceneMgr.CutSceneEventDic[0].transform.position = EventList[i].ActionPos;
                    break;

                //< 이펙트 실행
                case eCutSceneEvent.SpawnEffect:
                    SpawnEffect(EventList[i]);
                    break;

                //< 카메라 쉐이킹
                case eCutSceneEvent.CameraShake:
                    CutSceneMgr.Shake((byte)EventList[i].ActionValue);
                    break;

                //< 보스 UI 출력
                case eCutSceneEvent.ShowRaidBossUI:
                    if (null == UIMgr.GetUI("InGame/BossCutscenePanel"))
                    {
                        UIMgr.Open("InGame/BossCutscenePanel", EventList[i].ActionValue);
                    }
                    break;

                //< 보스 대화 출력
                case eCutSceneEvent.RaidBossTalk:
                    unit = CutSceneMgr.CutSceneEventDic[0].GetComponent <Unit>();
                    G_GameInfo.GameInfo.StartCoroutine(RaidBossTalkUpdate(unit, EventList[i].ActionString));
                    break;

                //< 애니메이션 실행
                case eCutSceneEvent.AnimaionPlay:
                    unit = CutSceneMgr.CutSceneEventDic[(int)EventList[i].ActionValue].GetComponent <Unit>();
                    if (unit != null)
                    {
                        eAnimName aniName = GetAniName(EventList[i].ActionString);
                        unit.PlayAnim(aniName, false, 0.2f, true);

                        //< 해당 애니메이션 플레이 시간을 얻는다.
                        if (aniName != eAnimName.Anim_idle)
                        {
                            EventList[i].ActionDelay = unit.Animator.GetAnimLength(aniName) - 0.2f;
                        }
                    }
                    else
                    {
                        //< 유닛이 없다면 그냥 바로 실행시켜준다.
                        CutSceneMgr.CutSceneEventDic[(int)EventList[i].ActionValue].animation.CrossFade(EventList[i].ActionString, 0.5f);
                    }
                    break;

                //< 플레이 자체는 멈춰둔다.
                case eCutSceneEvent.StopUpdate:
                    CutSceneMgr.seq.Pause();
                    break;

                case eCutSceneEvent.StartUpdate:
                    CutSceneMgr.seq.Play();
                    break;

                //< 페이드 인(밝아지는처리)
                case eCutSceneEvent.SetFadeIn:
                    CutSceneMgr.seq.Pause();
                    yield return(G_GameInfo._GameInfo.StartCoroutine(_CameraFadeEventObj.FadeInUpdate()));

                    CutSceneMgr.seq.Play();

                    //< 스킵버튼 체크한다.
                    SetSkipPanel();
                    break;

                //< 페이드 아웃(어두워지는 처리)
                case eCutSceneEvent.SetFadeOut:
                    if (_CameraFadeEventObj == null)
                    {
                        _CameraFadeEventObj = (Instantiate(Resources.Load("Camera/CameraFadeEvent")) as GameObject).GetComponent <CameraFadeEvent>();
                        _CameraFadeEventObj.transform.parent        = CutSceneMgr.startCamObj.transform;
                        _CameraFadeEventObj.transform.localPosition = new Vector3(0, 0, 1);
                        _CameraFadeEventObj.transform.localRotation = Quaternion.identity;
                    }

                    GameObject panel = UIMgr.GetUI("CutSceneSkipPanel");
                    if (panel != null)
                    {
                        panel.GetComponent <UIBasePanel>().Close();
                    }

                    yield return(G_GameInfo._GameInfo.StartCoroutine(_CameraFadeEventObj.FadeOutUpdate()));

                    break;

                //< 레이드를 위한 기본 카메라 위치 셋팅
                case eCutSceneEvent.SetRaidDefaultPos:
                    CutSceneMgr.startRootObj.transform.position = Vector3.zero;
                    CutSceneMgr.startRootObj.transform.rotation = Quaternion.identity;

                    CutSceneMgr.startCamObj.transform.parent        = CutSceneMgr.startRootObj.transform;
                    CutSceneMgr.startCamObj.transform.localPosition = Vector3.zero;
                    CutSceneMgr.startCamObj.transform.localRotation = Quaternion.identity;
                    break;

                case eCutSceneEvent.SetActive:
                    CutSceneMgr.CutSceneEventDic[(int)EventList[i].ActionValue].SetActive(EventList[i].ActionBool);
                    break;

                case eCutSceneEvent.SetTimeScale:
                    SetTimeScale(EventList[i]);
                    break;
                }

                //< 딜레이동안 대기
                yield return(new WaitForSeconds(EventList[i].ActionDelay));
            }

            yield return(null);
        }