private void OnLoadScene(GameObject go)
 {
     this.m_SceneRoot = (TacticsSceneSettings)go.GetComponent <TacticsSceneSettings>();
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_SceneRoot, (UnityEngine.Object)null) && UnityEngine.Object.op_Inequality((UnityEngine.Object)Camera.get_main(), (UnityEngine.Object)null))
     {
         RenderPipeline component = (RenderPipeline)((Component)Camera.get_main()).GetComponent <RenderPipeline>();
         if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null))
         {
             component.BackgroundImage = (Texture)this.m_SceneRoot.BackgroundImage;
             component.ScreenFilter    = (Texture)this.m_SceneRoot.ScreenFilter;
         }
         if (this.m_SceneRoot.OverrideCameraSettings)
         {
             this.m_CamYawMin = this.m_SceneRoot.CameraYawMin;
             this.m_CamYawMax = this.m_SceneRoot.CameraYawMax;
         }
         else
         {
             GameSettings instance = GameSettings.Instance;
             this.m_CamYawMin = instance.GameCamera_YawMin;
             this.m_CamYawMax = instance.GameCamera_YawMax;
         }
         this.m_SceneRoot.GenerateGridMesh(this.CurrentMap.Width, this.CurrentMap.Height);
     }
     go.SetActive(true);
 }
Esempio n. 2
0
 public void CreateMoveRange(TacticsSceneSettings setting)
 {
     if (this.m_MoveRange != null)
     {
         return;
     }
     this.m_MoveRange = new TacticsSceneCamera.MoveRange();
     if (!setting.OverrideCameraSettings)
     {
         return;
     }
     this.m_MoveRange.isOverride = setting.OverrideCameraSettings;
     this.m_MoveRange.min        = 360f - setting.CameraYawMax;
     this.m_MoveRange.max        = 360f - setting.CameraYawMin;
     this.m_MoveRange.start      = this.m_MoveRange.min;
 }
Esempio n. 3
0
        public override void OnActivate()
        {
            if (string.IsNullOrEmpty(this.objectName))
            {
                return;
            }
            TacticsSceneSettings lastScene = TacticsSceneSettings.LastScene;

            if (Object.op_Equality((Object)lastScene, (Object)null))
            {
                return;
            }
            List <Transform> transformList = new List <Transform>();
            float            num           = float.PositiveInfinity;
            Transform        transform     = (Transform)null;

            Transform[] componentsInChildren = (Transform[])((Component)lastScene).get_gameObject().GetComponentsInChildren <Transform>(true);
            for (int index = 0; index < componentsInChildren.Length; ++index)
            {
                if (((Object)componentsInChildren[index]).get_name() == this.objectName)
                {
                    Debug.Log((object)"find");
                    transformList.Add(componentsInChildren[index]);
                    Vector3 vector3 = Vector3.op_Subtraction(componentsInChildren[index].get_position(), this.objectPosition);
                    // ISSUE: explicit reference operation
                    float sqrMagnitude = ((Vector3)@vector3).get_sqrMagnitude();
                    if ((double)sqrMagnitude < (double)num)
                    {
                        transform = componentsInChildren[index];
                        num       = sqrMagnitude;
                    }
                }
            }
            if (Object.op_Inequality((Object)transform, (Object)null))
            {
                ((Component)transform).get_gameObject().SetActive(this.visibleType == EventAction_ActivateObjectInScene.VisibleType.Visible);
            }
            this.ActivateNext();
        }