Exemplo n.º 1
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());
        }
Exemplo n.º 2
0
        public uint CreateCamera(uint cameraType, uint followEntityRuntimeID, uint followMode)
        {
            BaseMonoCamera camera = null;

            return(camera.GetRuntimeID());
        }