Esempio n. 1
0
 public BattleCameras()
 {
     _camCutInCamera                   = GameObject.Find("UIRoot/CutInCamera").GetComponent <BattleCutInCamera>();
     _camCutInCamera.cullingMask       = (Generics.Layers.UI2D | Generics.Layers.CutIn);
     _camCutInCamera.depth             = 6f;
     _camCutInCamera.clearFlags        = CameraClearFlags.Depth;
     _camCutInEffectCamera             = GameObject.Find("UIRoot/CutInEffectCamera").GetComponent <BattleCutInEffectCamera>();
     _camCutInEffectCamera.cullingMask = Generics.Layers.CutIn;
     _camCutInEffectCamera.isCulling   = false;
     _camCutInEffectCamera.depth       = 5f;
     _camCutInEffectCamera.clearFlags  = CameraClearFlags.Depth;
     _listCameras = new List <BattleFieldCamera>();
     foreach (int value in Enum.GetValues(typeof(FleetType)))
     {
         if (value != 2)
         {
             BattleFieldCamera item = (!GameObject.Find($"Stage/{(FleetType)value}FieldCamera")) ? null : GameObject.Find($"Stage/{(FleetType)value}FieldCamera").GetComponent <BattleFieldCamera>();
             _listCameras.Add(item);
             if (_listCameras[value] != null)
             {
                 _listCameras[value].cullingMask = GetDefaultLayers();
                 _listCameras[value].ResetMotionBlur();
                 _listCameras[value].depth = 0f;
             }
         }
     }
     _camFieldDimCamera             = BattleFieldDimCamera.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabFieldDimCamera).GetComponent <BattleFieldDimCamera>(), BattleTaskManager.GetStage());
     _camFieldDimCamera.syncTarget  = _listCameras[0].transform;
     _camFieldDimCamera.cullingMask = GetDefaultDimLayers();
     _camFieldDimCamera.isCulling   = false;
     _camFieldDimCamera.depth       = -1f;
 }
 public BattleCameras()
 {
     this._camCutInCamera                   = GameObject.Find("UIRoot/CutInCamera").GetComponent <BattleCutInCamera>();
     this._camCutInCamera.cullingMask       = (Generics.Layers.UI2D | Generics.Layers.CutIn);
     this._camCutInCamera.depth             = 6f;
     this._camCutInCamera.clearFlags        = 3;
     this._camCutInEffectCamera             = GameObject.Find("UIRoot/CutInEffectCamera").GetComponent <BattleCutInEffectCamera>();
     this._camCutInEffectCamera.cullingMask = Generics.Layers.CutIn;
     this._camCutInEffectCamera.isCulling   = false;
     this._camCutInEffectCamera.depth       = 5f;
     this._camCutInEffectCamera.clearFlags  = 3;
     this._listCameras = new List <BattleFieldCamera>();
     using (IEnumerator enumerator = Enum.GetValues(typeof(FleetType)).GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             FleetType fleetType = (FleetType)((int)enumerator.get_Current());
             if (fleetType != FleetType.CombinedFleet)
             {
                 BattleFieldCamera battleFieldCamera = (!GameObject.Find(string.Format("Stage/{0}FieldCamera", fleetType))) ? null : GameObject.Find(string.Format("Stage/{0}FieldCamera", fleetType)).GetComponent <BattleFieldCamera>();
                 this._listCameras.Add(battleFieldCamera);
                 if (this._listCameras.get_Item((int)fleetType) != null)
                 {
                     this._listCameras.get_Item((int)fleetType).cullingMask = this.GetDefaultLayers();
                     this._listCameras.get_Item((int)fleetType).ResetMotionBlur();
                     this._listCameras.get_Item((int)fleetType).depth = 0f;
                 }
             }
         }
     }
     this._camFieldDimCamera             = BattleFieldDimCamera.Instantiate(BattleTaskManager.GetPrefabFile().prefabFieldDimCamera.GetComponent <BattleFieldDimCamera>(), BattleTaskManager.GetStage());
     this._camFieldDimCamera.syncTarget  = this._listCameras.get_Item(0).get_transform();
     this._camFieldDimCamera.cullingMask = this.GetDefaultDimLayers();
     this._camFieldDimCamera.isCulling   = false;
     this._camFieldDimCamera.depth       = -1f;
 }