From 536d04af5b638a04efb46f93214b7f9ac73af875 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期六, 10 十一月 2018 10:12:53 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/Vip/VipInvest/WheelOfFortuneModel.cs |  139 +++++++++++++++++++++++-----------------------
 1 files changed, 70 insertions(+), 69 deletions(-)

diff --git a/System/Vip/VipInvest/WheelOfFortuneModel.cs b/System/Vip/VipInvest/WheelOfFortuneModel.cs
index fefae7e..7c1c7b1 100644
--- a/System/Vip/VipInvest/WheelOfFortuneModel.cs
+++ b/System/Vip/VipInvest/WheelOfFortuneModel.cs
@@ -12,6 +12,7 @@
 namespace Snxxz.UI
 {
 
+    [XLua.LuaCallCSharp]
     public class WheelOfFortuneModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk, IOpenServerActivity
     {
         public class AngleClass
@@ -26,64 +27,64 @@
         public float AngleSave = 0f;//瑙掑害璁板綍
         public Dictionary<int, AngleClass> AngleDic = new Dictionary<int, AngleClass>();
         private double[][] AngleList;
-        public event Action<float> WheelOfFortuneUpdate;
-        public event Action<int> onStateUpate;
-
+        public event Action<float> WheelOfFortuneUpdate;
+        public event Action<int> onStateUpate;
+
         private string StrKey = string.Empty;
         private bool IsOk = false;
         private const int Redpoint_key1 = 20916;//骞歌繍杞洏绾㈢偣
         public Redpoint redPointStre1 = new Redpoint(209, Redpoint_key1);
         VipModel m_Vipmodel;
-        VipModel vipmodel { get { return m_Vipmodel ?? (m_Vipmodel = ModelCenter.Instance.GetModel<VipModel>()); } }
-
-        public bool IsOpen
-        {
-            get
-            {
-                return FuncOpen.Instance.IsFuncOpen(144);
-            }
-        }
-
-        public bool IsAdvance
-        {
-            get
-            {
-                return false;
-            }
-        }
-
-        public bool priorityOpen
-        {
-            get
-            {
-                if (redPointStre1.state == RedPointState.Simple)
-                {
-                    return true;
-                }
-                else
-                {
-                    return false;
-                }
-            }
-        }
-
+        VipModel vipmodel { get { return m_Vipmodel ?? (m_Vipmodel = ModelCenter.Instance.GetModel<VipModel>()); } }
+
+        public bool IsOpen
+        {
+            get
+            {
+                return FuncOpen.Instance.IsFuncOpen(144);
+            }
+        }
+
+        public bool IsAdvance
+        {
+            get
+            {
+                return false;
+            }
+        }
+
+        public bool priorityOpen
+        {
+            get
+            {
+                if (redPointStre1.state == RedPointState.Simple)
+                {
+                    return true;
+                }
+                else
+                {
+                    return false;
+                }
+            }
+        }
+
         public override void Init()
-        {
+        {
             OpenServerActivityCenter.Instance.Register(16, this);
             var BindJadewheel = Config.Instance.Get<FuncConfigConfig>("BindJadeWheelCfg");
             NeedJade = int.Parse(BindJadewheel.Numerical1);
             AngleList = JsonMapper.ToObject<double[][]>(BindJadewheel.Numerical5);
-            if (AngleDic.Count <= 0)
-            {
-                for (int i = 0; i < AngleList.Length; i++)
-                {
-                    int Type = i + 1;
-                    AngleClass angleClass = new AngleClass();
-                    angleClass.AngleStart = (float)AngleList[i][0];
-                    angleClass.AngleEnd = (float)AngleList[i][1];
-                    AngleDic.Add(Type, angleClass);
-                }
-            }
+            if (AngleDic.Count <= 0)
+            {
+                for (int i = 0; i < AngleList.Length; i++)
+                {
+                    int Type = i + 1;
+                    AngleClass angleClass = new AngleClass();
+                    angleClass.AngleStart = (float)AngleList[i][0];
+                    angleClass.AngleEnd = (float)AngleList[i][1];
+                    AngleDic.Add(Type, angleClass);
+                }
+            }
         }
 
         public override void UnInit()
@@ -93,8 +94,8 @@
 
         public void OnBeforePlayerDataInitialize()
         {
-            IsOk = false;
-
+            IsOk = false;
+
         }
 
         public void OnPlayerLoginOk()
@@ -107,17 +108,17 @@
             StrKey = "IsOpenFiaryJadeRedPoint" + PlayerDatas.Instance.baseData.PlayerID;
             AngleSave = LocalSave.GetFloat(StrKey);
             RedPoint();
-        }
-
-
-
+        }
+
+
+
         private void OnFuncStateChangeEvent(int obj)
         {
             if (obj == 144)
             {
-                if (onStateUpate != null)
-                {
-                    onStateUpate(16);
+                if (onStateUpate != null)
+                {
+                    onStateUpate(16);
                 }
                 RedPoint();
             }
@@ -131,22 +132,22 @@
             {
                 if (AngleDic.ContainsKey(Lattice))
                 {
-                    float flo = UnityEngine.Random.Range(AngleDic[Lattice].AngleStart + 1f, AngleDic[Lattice].AngleEnd - 1f);
+                    float flo = UnityEngine.Random.Range(AngleDic[Lattice].AngleStart + 1f, AngleDic[Lattice].AngleEnd - 1f);
                     flo = (float)Math.Round((double)flo, 2);
                     if (flo > 360f)
                     {
                         flo = flo - 360f;
                     }
-                    if (Math.Abs(flo- AngleSave)<=0.2)
-                    {
-                        if ((flo + 1f )> (AngleDic[Lattice].AngleStart + 1f) && (flo + 1f) < (AngleDic[Lattice].AngleEnd - 1f))
-                        {
-                            flo += 1;
-                        }
-                        else if ((flo - 1f) > (AngleDic[Lattice].AngleStart + 1f) && (flo - 1f) < (AngleDic[Lattice].AngleEnd - 1f))
-                        {
-                            flo -= 1;
-                        }
+                    if (Math.Abs(flo- AngleSave)<=0.2)
+                    {
+                        if ((flo + 1f )> (AngleDic[Lattice].AngleStart + 1f) && (flo + 1f) < (AngleDic[Lattice].AngleEnd - 1f))
+                        {
+                            flo += 1;
+                        }
+                        else if ((flo - 1f) > (AngleDic[Lattice].AngleStart + 1f) && (flo - 1f) < (AngleDic[Lattice].AngleEnd - 1f))
+                        {
+                            flo -= 1;
+                        }
                     }
                     LocalSave.SetFloat(StrKey, flo);
                     AngleSave = LocalSave.GetFloat(StrKey);
@@ -156,7 +157,7 @@
                     WheelOfFortuneUpdate(AngleSave);
                 }
                 RedPoint();
-            }
+            }
         }
         public void StartTheDraw()//寮�濮嬫娊濂�
         {

--
Gitblit v1.8.0