상속: UnityEngine.ScriptableObject
예제 #1
0
    protected void InitMapCamera(int _sceneIndex, System.Action _callBack)
    {
        if (mapCamera == null)
        {
            return;
        }
        SceneRef sceneRef = ConfigMng.Instance.GetSceneRef(_sceneIndex);

        if (sceneRef == null)
        {
            return;
        }
        mapCamera.transform.localPosition = new Vector3(sceneRef.sceneWidth / 2.0f, 5, sceneRef.sceneLength / 2.0f);
        mapCamera.orthographicSize        = sceneRef.sceneLength / 2.0f;
        mapCamera.gameObject.SetActive(true);
        mapCamera.aspect      = sceneRef.sceneWidth / sceneRef.sceneLength;
        mapCamera.enabled     = true;
        mapCamera.cullingMask = LayerMng.GetLayerMask(LayerMaskType.LogicMap);
        if (curLogicMapTex2D != null)
        {
            DestroyImmediate(curLogicMapTex2D, true);
            curLogicMapTex2D = null;
        }
        StartCoroutine(CaptureByCamera(mapCamera, new Rect(0, 0, sceneRef.sceneWidth, sceneRef.sceneLength), (x) =>
        {
            curLogicMapTex2D = x;
            mapCamera.gameObject.SetActive(false);
            mapCamera.enabled = false;
            if (_callBack != null)
            {
                _callBack();
            }
        }));
    }
예제 #2
0
파일: Game.cs 프로젝트: atom-chen/tianyu
 protected virtual bool InitSubModules()
 {
     // init layer manager
     LayerMng.Init();
     return(true);
 }