コード例 #1
0
    // 컷씬 발동 조건이 충족됐으면 컷씬을 연다.
    public void openAndLoadCutScene(CutSceneData selectCutScene)
    {
        nowOpenCutScene = true;

#if UNITY_EDITOR
        Debug.LogError("openAndLoadCutScene selectCutScene : " + selectCutScene.id);
#endif

        currentCutScene = selectCutScene;

                #if UNITY_EDITOR
        Debug.LogError("openAndLoadCutScene CutSceneManager.nowOpenCutSceneType : " + CutSceneManager.nowOpenCutSceneType);

        if (DebugManager.instance.useDebug && CutSceneMakerForDesigner.instance.useCutSceneMaker)
        {
            CutSceneManager.nowOpenCutSceneType = CutSceneManager.CutSceneType.Pre;
        }
#endif

        if (CutSceneManager.nowOpenCutSceneType == CutSceneManager.CutSceneType.Pre)
        {
            currentCutScene.load();
            GameManager.me.cutSceneManager.startCutScene();

                        #if UNITY_EDITOR
            GameManager.me.cutSceneManager.lbCutSceneId.text = currentCutScene.id;
                        #endif
        }
    }
コード例 #2
0
    public void initCutScene()
    {
        nowOpenCutScene     = false;
        currentCutScene     = null;
        cutSceneCount       = 0;
        readyCutScene       = null;
        hasCutScene         = false;
        blockControl        = false;
        nowOpenCutSceneType = CutSceneManager.CutSceneType.Close;

        init();

        if (string.IsNullOrEmpty(GameManager.me.stageManager.getCutSceneId()) == false)
        {
            string[] str = GameManager.me.stageManager.getCutSceneId().Split(',');
            readyCutScene = new CutSceneData[str.Length];

            cutSceneCount = str.Length;
            for (int i = 0; i < cutSceneCount; ++i)
            {
                readyCutScene[i] = GameManager.info.cutSceneData[str[i]];
                readyCutScene[i].init();
                hasCutScene = true;
                status      = Status.PREPARE;
            }
            return;
        }

        status = Status.NONE;
    }
コード例 #3
0
    public void startUnitSkillCamScene(string id, Vector3 centerPosition, UIPlay.SKILL_EFFECT_CAM_TYPE camType, int skillSlotIndex = -1, bool changeCameraClip = true)
    {
#if UNITY_EDITOR
        if (BattleSimulator.nowSimulation)
        {
            return;
        }

//		if(camType == UIPlay.SKILL_EFFECT_CAM_TYPE.UnitSkill && UnitSkillCamMaker.instance.useUnitSkillCamMaker == false) return;
#else
        //if(camType == UIPlay.SKILL_EFFECT_CAM_TYPE.UnitSkill) return;
#endif

        if (string.IsNullOrEmpty(id) || GameManager.info.unitSkillCamData.ContainsKey(id) == false)
        {
#if UNITY_EDITOR
            if (UnitSkillCamMaker.instance.useUnitSkillCamMaker)
            {
                foreach (KeyValuePair <string, CutSceneData> kv in GameManager.info.unitSkillCamData)
                {
                    id = kv.Key;
                }
            }
            else
#endif
            {
                return;
            }
        }

        if (camType != UIPlay.SKILL_EFFECT_CAM_TYPE.ChaserAttack)
        {
            GameManager.me.effectManager.skillCamParticleEffectVisibleIsHide(true);
        }

        GameManager.me.characterManager.restoreMonsterVisibleForSkillCam();

        UIPlay.nowSkillEffectCamCenterPosition       = centerPosition;
        UIPlay.nowSkillEffectCamStatus               = UIPlay.SKILL_EFFECT_CAM_STATUS.Play;
        UIPlay.showMapAfterBackToGameCamFromSkillCam = false;
        UIPlay.nowSkillEffectCamType = camType;

        UIPlay.isFollowPlayerWhenSkillEffectCamIdle = false;

        _q.eulerAngles = new Vector3(0, 0, 0);
        GameManager.me.gameCameraContainer.transform.localRotation = _q;

        if (UIPlay.nowSkillEffectCamType == UIPlay.SKILL_EFFECT_CAM_TYPE.HeroSkill)
        {
            UIPlayUnitSlot.lastActiveSkillUseSlotIndex = -1;
            usingSkillSlotIndex = skillSlotIndex;
        }
        else
        {
            usingSkillSlotIndex = -1;
        }

        if (camType != UIPlay.SKILL_EFFECT_CAM_TYPE.ChaserAttack)
        {
            initUnitSkillCamMonsterVisible();
        }

        nowOpenCutScene = true;

        nowOpenCutSceneType = CutSceneType.UnitCam;

        currentCutScene = GameManager.info.unitSkillCamData[id];

        currentCutScene.load(true);

        currentCutScene.init();

        init();

        if (changeCameraClip)
        {
            useUnitCamCamra = true;                         // useCutSceneCameraWithoutClipSetting();
        }
        else
        {
            useCutSceneCameraWithoutClipSetting();
        }

        currentCutScene.status = CutSceneData.STATUS.PLAY;
        currentCutScene.update();         // 0초 이하인 이벤트는 여기에서 바로 실행시켜준다.

        btnCutSceneSpeed.gameObject.SetActive(false);
        nowCutSceneSpeed  = 1;
        prevCutSceneSpeed = 1;
    }