コード例 #1
0
ファイル: BaseObject.cs プロジェクト: woshiduanli/DLLResouce
    protected virtual void Dispose(bool isDisposing)
    {
        foreach (var om in GameObjectAndModelInfoList.Values)
        {
            om.Destroy();
        }
        foreach (var go in StarEffectList)
        {
            Object.Destroy(go);
        }
        foreach (var go in EffectList)
        {
            Object.Destroy(go);
        }
        BoneTrans.Clear();
        GameObjectAndModelInfoList.Clear();
        StarEffectList.Clear();
        EffectList.Clear();

        BoneTrans = null;
        GameObjectAndModelInfoList = null;
        StarEffectList             = null;
        EffectList     = null;
        BaseRoleConfig = null;
        LoadingEffect  = null;
        RoleObject     = null;

        DestroyGameObject();
    }
コード例 #2
0
    //< 씬이 종료될때 호출되는곳
    public static void EndScene(bool InGame = true)
    {
        UIHelper.SetMainCameraActive(true);
        if (spawnCtlr != null)
        {
            spawnCtlr.setNpcActiveExceptBoss(true);
        }

        if (EndCall != null)
        {
            EndCall();
        }
        EndCall = null;

        StartCheck = false;
        CutSceneEventDic.Clear();

        if (InGame)
        {
            GameInfoBase.NotTimeUpdate = false;
        }

        Time.timeScale = GameDefine.DefaultTimeScale;

        for (int i = 0; i < EffectList.Count; i++)
        {
            if (EffectList[i] != null)
            {
                DestroyImmediate(EffectList[i]);
            }
        }
        EffectList.Clear();

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

        if (InGame)
        {
            CutSceneSendMessage.PauseAllUnits(false);

            GameObject appearPanel = UIMgr.GetUI("UIPanel/AppearBossPanel");
            if (appearPanel != null)
            {
                appearPanel.GetComponent <AppearBossPanel>().Close();
            }

            UIMgr.setHudPanelVisible(true);
            UIMgr.setInGameBoardPanelVisible(true);
        }

        if (seq != null)
        {
            Destroy(seq.gameObject);
        }

        if (CutSceneSendMessage._CameraFadeEventObj != null)
        {
            Destroy(CutSceneSendMessage._CameraFadeEventObj.gameObject);
        }

        if (startCamObj != null)
        {
            Destroy(startCamObj);
        }

        if (startRootObj != null)
        {
            Destroy(startRootObj);
        }

        if (InGame)
        {
            TempCoroutine.instance.FrameDelay(0.1f, () =>
            {
                //< 혹시나 포커싱카메라가 없을수도있기에 체크
                if (G_GameInfo.GameInfo.FocusingCam == null)
                {
                    G_GameInfo.GameInfo.FocusingCam = ResourceMgr.InstAndGetComponent <FocusingCamera>("Camera/FocusingCamera");
                    G_GameInfo.GameInfo.FocusingCam.SetTargetCamera(CameraManager.instance.mainCamera);

                    if (SkillEventMgr.Live)
                    {
                        SkillEventMgr.instance.Setup(CameraManager.instance.RtsCamera, G_GameInfo.GameInfo.FocusingCam);
                    }
                }

                //< 포커싱카메라가 안꺼져있을수있으므로 꺼줌
                if (G_GameInfo.GameInfo.FocusingCam != null && G_GameInfo.GameInfo.FocusingCam.gameObject.activeSelf)
                {
                    G_GameInfo.GameInfo.FocusingCam.EndUpdate();
                }
            });
        }
        GameObject UIShadowLight = GameObject.Find("UI_ShadowLight");         //cyoung 추가

        if (UIShadowLight != null)
        {
            UIShadowLight.GetComponent <Light> ().enabled = true;
        }
    }
コード例 #3
0
ファイル: GameCore.cs プロジェクト: Juansero29/SFDScripts
 public static void ResetEffects()
 {
     EffectList.Clear();
 }