Пример #1
0
 public static void Create(this TacticsSceneCamera.AllRangeObj self, TacticsSceneCamera.AllRange data)
 {
     if (data.groups == null)
     {
         return;
     }
     self.data   = data;
     self.groups = new TacticsSceneCamera.AllRangeObj.GroupObj[data.groups.Length];
     for (int index = 0; index < data.groups.Length; ++index)
     {
         TacticsSceneCamera.AllRangeObj.GroupObj groupObj = new TacticsSceneCamera.AllRangeObj.GroupObj();
         groupObj.data  = data.groups[index];
         groupObj.state = 0;
         groupObj.alpha = 1f;
         groupObj.renders.AddRange((IEnumerable <TacticsSceneCamera.RenderSet>)TacticsSceneCamera.GetRenderSets(groupObj.data.gobjs, (string[])null));
         self.groups[index] = groupObj;
     }
 }
Пример #2
0
 private void UpdateAllRangeCamera()
 {
     for (int index1 = 0; index1 < this.m_AllRangeObj.groups.Length; ++index1)
     {
         TacticsSceneCamera.AllRangeObj.GroupObj group = this.m_AllRangeObj.groups[index1];
         for (int index2 = 0; index2 < group.renders.Count; ++index2)
         {
             TacticsSceneCamera.RenderSet render = group.renders[index2];
             bool flag = (double)group.alpha > 0.0;
             for (int index3 = 0; index3 < render.meshRenderers.Count; ++index3)
             {
                 ((Renderer)render.meshRenderers[index3]).set_enabled(flag);
             }
             for (int index3 = 0; index3 < render.skinRenderers.Count; ++index3)
             {
                 ((Renderer)render.meshRenderers[index3]).set_enabled(flag);
             }
         }
     }
 }
Пример #3
0
        private void CalcAllRangeCamera()
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null))
            {
                return;
            }
            float num1 = 360f - SceneBattle.Instance.GetCameraAngle();

            if ((double)num1 < 0.0)
            {
                num1 += 360f;
            }
            else if ((double)num1 >= 360.0)
            {
                num1 -= 360f;
            }
            for (int index = 0; index < this.m_AllRangeObj.groups.Length; ++index)
            {
                TacticsSceneCamera.AllRangeObj.GroupObj group = this.m_AllRangeObj.groups[index];
                float min   = group.data.min;
                float max   = group.data.max;
                float num2  = group.data.prange;
                bool  flag1 = false;
                if ((double)num2 == 0.0)
                {
                    num2 = 1f;
                }
                bool flag2 = (double)min <(double)num1 && (double)min + (double)num2> (double) num1 || (double)max > (double)num1 && (double)max - (double)num2 < (double)num1;
                if (group.state == 0)
                {
                    if ((double)num1 > (double)min && (double)num1 < (double)max)
                    {
                        if (flag1)
                        {
                            group.alpha -= group.alpha * 0.2f;
                        }
                        else
                        {
                            group.alpha = 0.0f;
                        }
                        if ((double)group.alpha < 0.00999999977648258)
                        {
                            group.alpha = 0.0f;
                            if (!flag2)
                            {
                                group.state = 1;
                            }
                        }
                    }
                    else
                    {
                        if (flag1)
                        {
                            group.alpha += (float)((1.0 - (double)group.alpha) * 0.200000002980232);
                        }
                        else
                        {
                            group.alpha = 1f;
                        }
                        if ((double)group.alpha > 0.990000009536743)
                        {
                            group.alpha = 1f;
                        }
                    }
                }
                else if (group.state == 1)
                {
                    float num3 = min + num2;
                    float num4 = max - num2;
                    if ((double)num1 >= (double)num3 && (double)num1 <= (double)num4)
                    {
                        if (flag1)
                        {
                            group.alpha -= group.alpha * 0.2f;
                        }
                        else
                        {
                            group.alpha = 0.0f;
                        }
                        if ((double)group.alpha < 0.00999999977648258)
                        {
                            group.alpha = 0.0f;
                        }
                    }
                    else
                    {
                        if (flag1)
                        {
                            group.alpha += (float)((1.0 - (double)group.alpha) * 0.200000002980232);
                        }
                        else
                        {
                            group.alpha = 1f;
                        }
                        if ((double)group.alpha > 0.990000009536743)
                        {
                            group.alpha = 1f;
                            if (!flag2)
                            {
                                group.state = 0;
                            }
                        }
                    }
                }
            }
        }