Example #1
0
 public void RegisterCameraData(uint cameraType, BaseMonoCamera camera, uint runtimeID)
 {
     this._cameraDict.Add(runtimeID, camera);
     if (cameraType == 1)
     {
         this._mainCameraRuntimeID = runtimeID;
     }
     else if (cameraType == 2)
     {
         this._inlevelCameraRuntimeID = runtimeID;
     }
 }
Example #2
0
        public uint CreateCamera(uint cameraType)
        {
            BaseMonoCamera component = null;

            component = UnityEngine.Object.Instantiate <GameObject>(Miscs.LoadResource <GameObject>(CameraData.GetPrefabResPath(cameraType), BundleType.RESOURCE_FILE)).GetComponent <BaseMonoCamera>();
            uint nextRuntimeID = Singleton <RuntimeIDManager> .Instance.GetNextRuntimeID(2);

            this.RegisterCameraData(cameraType, component, nextRuntimeID);
            switch (cameraType)
            {
            case 1:
                ((MonoMainCamera)component).Init(nextRuntimeID);
                break;

            case 2:
                ((MonoInLevelUICamera)component).Init(nextRuntimeID);
                break;

            default:
                throw new Exception("Invalid Type or State!");
            }
            return(component.GetRuntimeID());
        }
Example #3
0
        public uint CreateCamera(uint cameraType, uint followEntityRuntimeID, uint followMode)
        {
            BaseMonoCamera camera = null;

            return(camera.GetRuntimeID());
        }