Beispiel #1
0
    public ARRunner()
    {
        Singleton <PropertyManager> .Instance.AddRootContext(this);

        LevelEditorUnlocked = (from ltchunk in PlayerData.Instance.LifetimeChunk
                               select ltchunk >= 75).ToReactiveProperty().AddTo(SceneLoader.Instance);
        (from unlocked in LevelEditorUnlocked.Pairwise()
         where !unlocked.Previous && unlocked.Current
         select unlocked).Subscribe(delegate
        {
            BindingManager.Instance.LevelEditorUnlockedParent.ShowInfo();
        }).AddTo(SceneLoader.Instance);
        GameObject gameObject = (!(SceneLoader.Instance != null)) ? ARBindingManager.Instance.gameObject : BindingManager.Instance.gameObject;

        (from p in Observable.EveryApplicationPause().StartWith(value: false)
         where !p
         select p).DelayFrame(1).Subscribe(delegate
        {
            HasCameraPermission.Value = ARService.HasCameraPermission();
        }).AddTo(gameObject);
        if (PersistentSingleton <GameAnalytics> .Instance != null)
        {
            PersistentSingleton <GameAnalytics> .Instance.ARSupported = ARSupported;
        }
    }
Beispiel #2
0
 protected void Update()
 {
     if (ARService.HasCameraPermission())
     {
         base.gameObject.SetActive(value: false);
     }
 }
Beispiel #3
0
        public ActionResult List()
        {
            ListVModel vModel  = new ListVModel();
            ARService  service = new ARService();

            vModel.AREntities = service.GetEntities();
            return(View(vModel));
        }
Beispiel #4
0
 public ActionResult Add(AddVModel vModel)
 {
     if (ModelState.IsValid)
     {
         ARService service = new ARService();
         service.Add(vModel.AREntity);
     }
     return(View(vModel));
 }
Beispiel #5
0
        public ActionResult WriteOff(int arId)
        {
            ARService         service  = new ARService();
            var               ar       = service.GetByKey(arId);
            CollectionService cService = new CollectionService();
            WriteOffVModel    vModel   = new WriteOffVModel();

            vModel.WriteOffEntity.ARID = arId;
            vModel.CollectionEntities  = cService.GetEntities(ar.ClientID, true);
            return(View(vModel));
        }
Beispiel #6
0
 public ServiceErrorData(ARService service, Exception exception)
 {
     this.Service   = service;
     this.Exception = exception;
 }