Parcourir la source

Merge branch 'master' of http://git.dashgame.com/gsgundam/garden_client

gsgundam il y a 8 ans
Parent
commit
929fde62c7

+ 9 - 0
Assets/Advertisements/Editor/Resources/Android/builds.meta

@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 8d2d384f78b29a44a9c70c3daf45d1cb
+folderAsset: yes
+timeCreated: 1494301205
+licenseType: Pro
+DefaultImporter:
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 9 - 0
Assets/Advertisements/Editor/Resources/iOS/builds.meta

@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: f533cc2da3e36884f93fdd5dc9124f8c
+folderAsset: yes
+timeCreated: 1494301205
+licenseType: Pro
+DefaultImporter:
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 3 - 2
Assets/Resource/Logo.unity

@@ -445,8 +445,9 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: f1828554d8ffa12449b221fe29b2c32c, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  DebugMode: 0
-  DebugModeGo: {fileID: 0}
+  DebugMode: 1
+  DebugModeGo: {fileID: 1264531325540048, guid: b22fd2d9abc702d43ac62a412537d4e9,
+    type: 2}
 --- !u!4 &1833966245
 Transform:
   m_ObjectHideFlags: 0

+ 116 - 5
Assets/Resource/Prefab/PrefabUI/GroupE.prefab

@@ -140,7 +140,7 @@ GameObject:
   - component: {fileID: 114628483575551160}
   - component: {fileID: 114798544481346068}
   m_Layer: 5
-  m_Name: P_Save
+  m_Name: P_Return
   m_TagString: Untagged
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
@@ -651,6 +651,24 @@ GameObject:
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
   m_IsActive: 0
+--- !u!1 &1766607135279202
+GameObject:
+  m_ObjectHideFlags: 1
+  m_PrefabParentObject: {fileID: 0}
+  m_PrefabInternal: {fileID: 100100000}
+  serializedVersion: 5
+  m_Component:
+  - component: {fileID: 224523201006200968}
+  - component: {fileID: 222742105261906608}
+  - component: {fileID: 114655927516320440}
+  - component: {fileID: 114152894146773020}
+  m_Layer: 5
+  m_Name: P_Save
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
 --- !u!1 &1808383842750954
 GameObject:
   m_ObjectHideFlags: 1
@@ -1348,6 +1366,47 @@ MonoBehaviour:
     m_VerticalOverflow: 0
     m_LineSpacing: 1
   m_Text: "\u4E0A\u8863"
+--- !u!114 &114152894146773020
+MonoBehaviour:
+  m_ObjectHideFlags: 1
+  m_PrefabParentObject: {fileID: 0}
+  m_PrefabInternal: {fileID: 100100000}
+  m_GameObject: {fileID: 1766607135279202}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Navigation:
+    m_Mode: 3
+    m_SelectOnUp: {fileID: 0}
+    m_SelectOnDown: {fileID: 0}
+    m_SelectOnLeft: {fileID: 0}
+    m_SelectOnRight: {fileID: 0}
+  m_Transition: 1
+  m_Colors:
+    m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+    m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+    m_DisabledColor: {r: 1, g: 1, b: 1, a: 1}
+    m_ColorMultiplier: 1
+    m_FadeDuration: 0.1
+  m_SpriteState:
+    m_HighlightedSprite: {fileID: 0}
+    m_PressedSprite: {fileID: 0}
+    m_DisabledSprite: {fileID: 0}
+  m_AnimationTriggers:
+    m_NormalTrigger: Normal
+    m_HighlightedTrigger: Highlighted
+    m_PressedTrigger: Pressed
+    m_DisabledTrigger: Disabled
+  m_Interactable: 1
+  m_TargetGraphic: {fileID: 114655927516320440}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls: []
+    m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
+      Culture=neutral, PublicKeyToken=null
 --- !u!114 &114183743212847932
 MonoBehaviour:
   m_ObjectHideFlags: 1
@@ -2091,7 +2150,7 @@ MonoBehaviour:
       m_Calls: []
     m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
       Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-  m_Sprite: {fileID: 21300000, guid: cde66b70acacf1a47b8a81614f11dcfb, type: 3}
+  m_Sprite: {fileID: 21300000, guid: 1a54fd35ff8e5224ca011a412abf11b1, type: 3}
   m_Type: 0
   m_PreserveAspect: 0
   m_FillCenter: 1
@@ -2200,6 +2259,33 @@ MonoBehaviour:
       m_Calls: []
     m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
       Culture=neutral, PublicKeyToken=null
+--- !u!114 &114655927516320440
+MonoBehaviour:
+  m_ObjectHideFlags: 1
+  m_PrefabParentObject: {fileID: 0}
+  m_PrefabInternal: {fileID: 100100000}
+  m_GameObject: {fileID: 1766607135279202}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+    m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+      Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+  m_Sprite: {fileID: 21300000, guid: cde66b70acacf1a47b8a81614f11dcfb, type: 3}
+  m_Type: 0
+  m_PreserveAspect: 0
+  m_FillCenter: 1
+  m_FillMethod: 4
+  m_FillAmount: 1
+  m_FillClockwise: 1
+  m_FillOrigin: 0
 --- !u!114 &114661915387390872
 MonoBehaviour:
   m_ObjectHideFlags: 1
@@ -3022,6 +3108,12 @@ CanvasRenderer:
   m_PrefabParentObject: {fileID: 0}
   m_PrefabInternal: {fileID: 100100000}
   m_GameObject: {fileID: 1914603065110894}
+--- !u!222 &222742105261906608
+CanvasRenderer:
+  m_ObjectHideFlags: 1
+  m_PrefabParentObject: {fileID: 0}
+  m_PrefabInternal: {fileID: 100100000}
+  m_GameObject: {fileID: 1766607135279202}
 --- !u!222 &222745203875157514
 CanvasRenderer:
   m_ObjectHideFlags: 1
@@ -3258,12 +3350,12 @@ RectTransform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 224316464020746548}
-  m_RootOrder: 1
+  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: 69.14996, y: 0.099975586}
-  m_SizeDelta: {x: 73.2, y: 59.3}
+  m_AnchoredPosition: {x: -114.35005, y: 346.0008}
+  m_SizeDelta: {x: 89.1, y: 65.4}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!224 &224286975738916642
 RectTransform:
@@ -3313,6 +3405,7 @@ RectTransform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children:
   - {fileID: 224398397176885042}
+  - {fileID: 224523201006200968}
   - {fileID: 224277300051533002}
   m_Father: {fileID: 224042092064329274}
   m_RootOrder: 0
@@ -3569,6 +3662,24 @@ RectTransform:
   m_AnchoredPosition: {x: 167.68, y: -450}
   m_SizeDelta: {x: 86, y: 51}
   m_Pivot: {x: 0.5, y: 0.00000022724271}
+--- !u!224 &224523201006200968
+RectTransform:
+  m_ObjectHideFlags: 1
+  m_PrefabParentObject: {fileID: 0}
+  m_PrefabInternal: {fileID: 100100000}
+  m_GameObject: {fileID: 1766607135279202}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_Children: []
+  m_Father: {fileID: 224316464020746548}
+  m_RootOrder: 1
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0.5, y: 0.5}
+  m_AnchorMax: {x: 0.5, y: 0.5}
+  m_AnchoredPosition: {x: 69.14996, y: 0.099975586}
+  m_SizeDelta: {x: 73.2, y: 59.3}
+  m_Pivot: {x: 0.5, y: 0.5}
 --- !u!224 &224525768392981752
 RectTransform:
   m_ObjectHideFlags: 1

+ 4 - 4
Assets/Resource/XML/Config/lottery_config.xml

@@ -1,8 +1,8 @@
 <data>
-  <item id="1" type="1" rate="0.25" left_border="100000" right_border="200000" />
-  <item id="2" type="2" rate="0.25" left_border="100" right_border="200" />
-  <item id="3" type="3" rate="0.25" left_border="3" right_border="36" />
-  <item id="4" type="4" rate="0.25" left_border="2,201" right_border="30,217" />
+  <item id="1" type="1" rate="0.25" left_border="333" right_border="333" />
+  <item id="2" type="2" rate="0.25" left_border="333" right_border="333" />
+  <item id="3" type="3" rate="0.25" left_border="3" right_border="5" />
+  <item id="4" type="4" rate="0.25" left_border="2" right_border="4" />
   <comment>
     <id>
 id

+ 1 - 0
Assets/Resource/XML/lan/ChineseSimplified.xml

@@ -94,6 +94,7 @@
     <P_WingLab desc=""><![CDATA[翅膀]]></P_WingLab>
     <P_BtnLab1 desc=""><![CDATA[购买]]></P_BtnLab1>
     <P_BtnLab2 desc=""><![CDATA[已购<(已购)>]]></P_BtnLab2>
+    <P_Return desc=""><![CDATA[离开试衣间?]]></P_Return>
     <Pa_Tit desc=""><![CDATA[购买装扮]]></Pa_Tit>
     <Pa_BtnLab desc=""><![CDATA[购买]]></Pa_BtnLab>
     <N_Lab desc=""><![CDATA[去试衣间看看吧!]]></N_Lab>

+ 1 - 0
Assets/Resource/XML/lan/ChineseTraditional.xml

@@ -94,6 +94,7 @@
     <P_WingLab desc=""><![CDATA[翅膀]]></P_WingLab>
     <P_BtnLab1 desc=""><![CDATA[購買]]></P_BtnLab1>
     <P_BtnLab2 desc=""><![CDATA[已購<(已购)>]]></P_BtnLab2>
+    <P_Return desc=""><![CDATA[離開試衣間?]]></P_Return>
     <Pa_Tit desc=""><![CDATA[購買裝扮]]></Pa_Tit>
     <Pa_BtnLab desc=""><![CDATA[購買]]></Pa_BtnLab>
     <N_Lab desc=""><![CDATA[去試衣間看看吧!]]></N_Lab>

+ 1 - 0
Assets/Resource/XML/lan/English.xml

@@ -94,6 +94,7 @@
     <P_WingLab desc=""><![CDATA[Wing]]></P_WingLab>
     <P_BtnLab1 desc=""><![CDATA[Buy]]></P_BtnLab1>
     <P_BtnLab2 desc=""><![CDATA[Bought<(已购)>]]></P_BtnLab2>
+    <P_Return desc=""><![CDATA[Leave dress room?]]></P_Return>
     <Pa_Tit desc=""><![CDATA[Buy clothing]]></Pa_Tit>
     <Pa_BtnLab desc=""><![CDATA[Buy]]></Pa_BtnLab>
     <N_Lab desc=""><![CDATA[Go to your dress room!]]></N_Lab>

BIN
Assets/Resource/Xlsx/language_config.xlsx


BIN
Assets/Resource/Xlsx/lottery_config.xlsx


+ 175 - 159
Assets/Script/Manage/ManaSign.cs

@@ -90,7 +90,7 @@ public class Sign
     {
         if (IsLottery)
         {
-            Lottery.PlayAnimation();
+            Lottery.EnterAnimation();
 
             return;
         }
@@ -229,16 +229,21 @@ public class Lottery
 {
     #region Var
 
+    public int PosIndex;
     public int Type;
     public int Value;
     public Text Lab;
-    public Transform BK;
     public Image Icon1;
     public Image Icon2;
     public Button Button;
+    public Transform BK;
+    public Transform Item;
+
+    public static List<int> TempTypeList = new List<int>();
+    public static List<int> TempValueList = new List<int>();
+    public static List<Lottery> TempLotteryList = new List<Lottery>();
 
     public static List<int> TypeList = new List<int>();
-    public static List<int> ValueList = new List<int>();
     public static List<float> RateList = new List<float>();
     public static List<Vector3> PosList = new List<Vector3>();
     public static List<List<int>> LeftBorderDList = new List<List<int>>();
@@ -274,160 +279,143 @@ public class Lottery
         }
     }
 
-    public static void CreateLottery(Transform lotteryItem)
+    public static Lottery CreateLottery(int type, int posIndex, Transform lotteryItem)
     {
         Lottery lottery = new Lottery();
 
-        #region 默认值
-
-        lottery.Type = TypeList[0];
+        lottery.Type = type;
 
         lottery.Value = Random.Range(LeftBorderDList[0][0], RightBorderDList[0][0] + 1);
-        
-        #endregion
-
-        float random = Random.Range(0f, 1f);
 
-        for (int i = 0; i < RateList.Count; i++)
+        if (lottery.Type == 3)
         {
-            if (random <= RateList.MySum(f => f, i + 1))
-            {
-                lottery.Type = TypeList[i];
+            #region
 
-                if (lottery.Type == 3)
-                {
-                    #region
+            bool allUnlock = true;
 
-                    bool allUnlock = true;
-
-                    for (int j = 0; j < LeftBorderDList[i].Count; j++)
-                    {
-                        for (int k = LeftBorderDList[i][j]; k < RightBorderDList[i][j] + 1; k++)
-                        {
-                            if (!ManaGarden.FlowerInfoDic[k].Unlock && !ValueList.Contains(k))
-                            {
-                                allUnlock = false;
-                                
-                                goto exit;
-                            }
-                        }
-                    }
-                    exit :
-
-                    if (allUnlock)
+            for (int j = 0; j < LeftBorderDList[type - 1].Count; j++)
+            {
+                for (int k = LeftBorderDList[type - 1][j]; k < RightBorderDList[type - 1][j] + 1; k++)
+                {
+                    if (!ManaGarden.FlowerInfoDic[k].Unlock && !TempValueList.Contains(k))
                     {
-                        int index = Random.Range(0, LeftBorderDList[i].Count);
-
-                        lottery.Value = Random.Range(LeftBorderDList[i][index], RightBorderDList[i][index] + 1);
+                        allUnlock = false;
 
-                        FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic[lottery.Value];
-
-                        lottery.Value = flowerInfo.UnlockAmt/5;
-
-                        if (flowerInfo.UnlockCur == Current.Coin)
-                        {
-                            lottery.Type = 1;
-                        }
-                        else if (flowerInfo.UnlockCur == Current.Diamond)
-                        {
-                            lottery.Type = 2;
-                        }
+                        goto exit;
                     }
-                    else
-                    {
-                        int anticrush = 0;
+                }
+            }
+            exit :
 
-                        do
-                        {
-                            if (anticrush++>10000)
-                            {
-                                throw new Exception();
-                            }
+            if (allUnlock)
+            {
+                int index = Random.Range(0, LeftBorderDList[type - 1].Count);
 
-                            int index = Random.Range(0, LeftBorderDList[i].Count);
+                lottery.Value = Random.Range(LeftBorderDList[type - 1][index], RightBorderDList[type - 1][index] + 1);
 
-                            lottery.Value = Random.Range(LeftBorderDList[i][index], RightBorderDList[i][index] + 1);
-                        }
-                        while (ManaGarden.FlowerInfoDic[lottery.Value].Unlock || ValueList.Contains(lottery.Value));
+                FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic[lottery.Value];
 
-                        ValueList.Add(lottery.Value);
-                    }
+                lottery.Value = flowerInfo.UnlockAmt/5;
 
-                    #endregion
+                if (flowerInfo.UnlockCur == Current.Coin)
+                {
+                    lottery.Type = 1;
                 }
-                else if (lottery.Type == 4)
+                else if (flowerInfo.UnlockCur == Current.Diamond)
                 {
-                    #region
-
-                    bool allBought = true;
+                    lottery.Type = 2;
+                }
+            }
+            else
+            {
+                int anticrush = 0;
 
-                    for (int j = 0; j < LeftBorderDList[i].Count; j++)
+                do
+                {
+                    if (anticrush++ > 10000)
                     {
-                        for (int k = LeftBorderDList[i][j]; k < RightBorderDList[i][j] + 1; k++)
-                        {
-                            if (!ManaPlayer.CloseUnitDic[k].Bought && !ValueList.Contains(k))
-                            {
-                                allBought = false;
-                                
-                                goto exit;
-                            }
-                        }
+                        throw new Exception();
                     }
-                    exit :
 
-                    if (allBought)
-                    {
-                        int index = Random.Range(0, LeftBorderDList[i].Count);
+                    int index = Random.Range(0, LeftBorderDList[type - 1].Count);
 
-                        lottery.Value = Random.Range(LeftBorderDList[i][index], RightBorderDList[i][index] + 1);
+                    lottery.Value = Random.Range(LeftBorderDList[type - 1][index], RightBorderDList[type - 1][index] + 1);
+                } while (ManaGarden.FlowerInfoDic[lottery.Value].Unlock || TempValueList.Contains(lottery.Value));
 
-                        CloseUnit closeUnit = ManaPlayer.CloseUnitDic[lottery.Value];
+                TempValueList.Add(lottery.Value);
+            }
 
-                        lottery.Value = (int) closeUnit.BuyAmt/5;
+            #endregion
+        }
+        else if (lottery.Type == 4)
+        {
+            #region
 
-                        if (closeUnit.BuyCurrent == Current.Coin)
-                        {
-                            lottery.Type = 1;
-                        }
-                        else if (closeUnit.BuyCurrent == Current.Diamond)
-                        {
-                            lottery.Type = 2;
-                        }
-                    }
-                    else
+            bool allBought = true;
+
+            for (int j = 0; j < LeftBorderDList[type - 1].Count; j++)
+            {
+                for (int k = LeftBorderDList[type - 1][j]; k < RightBorderDList[type - 1][j] + 1; k++)
+                {
+                    if (!ManaPlayer.CloseUnitDic[k].Bought && !TempValueList.Contains(k))
                     {
-                        int anticrush = 0;
+                        allBought = false;
 
-                        do
-                        {
-                            if (anticrush++ > 10000)
-                            {
-                                throw new Exception();
-                            }
+                        goto exit;
+                    }
+                }
+            }
+            exit :
 
-                            int index = Random.Range(0, LeftBorderDList[i].Count);
+            if (allBought)
+            {
+                int index = Random.Range(0, LeftBorderDList[type - 1].Count);
 
-                            lottery.Value = Random.Range(LeftBorderDList[i][index], RightBorderDList[i][index] + 1);
-                        }
-                        while (ManaPlayer.CloseUnitDic[lottery.Value].Bought || ValueList.Contains(lottery.Value));
+                lottery.Value = Random.Range(LeftBorderDList[type - 1][index], RightBorderDList[type - 1][index] + 1);
 
-                        ValueList.Add(lottery.Value);
-                    }
+                CloseUnit closeUnit = ManaPlayer.CloseUnitDic[lottery.Value];
+
+                lottery.Value = (int) closeUnit.BuyAmt/5;
 
-                    #endregion
+                if (closeUnit.BuyCurrent == Current.Coin)
+                {
+                    lottery.Type = 1;
                 }
-                else
+                else if (closeUnit.BuyCurrent == Current.Diamond)
                 {
-                    int index = Random.Range(0, LeftBorderDList[i].Count);
-
-                    lottery.Value = Random.Range(LeftBorderDList[i][index], RightBorderDList[i][index] + 1);
+                    lottery.Type = 2;
                 }
+            }
+            else
+            {
+                int anticrush = 0;
 
-                break;
+                do
+                {
+                    if (anticrush++ > 10000)
+                    {
+                        throw new Exception();
+                    }
+
+                    int index = Random.Range(0, LeftBorderDList[type - 1].Count);
+
+                    lottery.Value = Random.Range(LeftBorderDList[type - 1][index], RightBorderDList[type - 1][index] + 1);
+                } while (ManaPlayer.CloseUnitDic[lottery.Value].Bought || TempValueList.Contains(lottery.Value));
+
+                TempValueList.Add(lottery.Value);
             }
+
+            #endregion
         }
+        else
+        {
+            int index = Random.Range(0, LeftBorderDList[type - 1].Count);
 
+            lottery.Value = Random.Range(LeftBorderDList[type - 1][index], RightBorderDList[type - 1][index] + 1);
+        }
 
+        lottery.PosIndex = posIndex;
+        lottery.Item = lotteryItem;
         lottery.BK = lotteryItem.GetChild(0);
         lottery.Icon1 = lotteryItem.GetChild(1).GetChild(0).GetComponent<Image>();
         lottery.Icon2 = lotteryItem.GetChild(1).GetChild(1).GetComponent<Image>();
@@ -480,7 +468,7 @@ public class Lottery
         {
             CloseUnit closeUnit = ManaPlayer.CloseUnitDic[lottery.Value];
 
-            float newSize = closeUnit.PixelSize / closeUnit.Sprites[0].rect.width;
+            float newSize = closeUnit.PixelSize/closeUnit.Sprites[0].rect.width;
 
             lottery.Icon2.sprite = closeUnit.Sprites[0];
 
@@ -490,7 +478,7 @@ public class Lottery
 
             lottery.Lab.SetActive(false);
 
-            if (closeUnit.Sprites.Length>1)
+            if (closeUnit.Sprites.Length > 1)
             {
                 lottery.Icon1.SetActive(true);
 
@@ -508,47 +496,39 @@ public class Lottery
 
         lottery.Button.onClick = new Button.ButtonClickedEvent();
 
-        lottery.Button.onClick.AddListener
-        (
-            () =>
-            {
-                ManaAudio.PlayClip(Clip.CurrentClip);
-                
-                ManaReso.Get<Button>("Bc_LotteryBack1").interactable = false;
-                ManaReso.Get<Button>("Bc_LotteryBack2").interactable = false;
-                ManaReso.Get<Button>("Bc_LotteryBack3").interactable = false;
-
-                lotteryItem.TweenBacEuler();
-
-                lottery.BK.SetActive(true);
-                
-                lottery.GetAward();
+        lottery.Button.onClick.AddListener(() => { OnClick(posIndex); });
 
-                Auxiliary.Instance.DelayCall
-                (
-                    () =>
-                    {
-                        ManaReso.Get("Bc_Confirm").TweenForCG();
-
-                        ManaReso.Get("Bc_LotteryItem1").TweenBacEuler();
-                        ManaReso.Get("Bc_LotteryItem2").TweenBacEuler();
-                        ManaReso.Get("Bc_LotteryItem3").TweenBacEuler();
-                    },
-                    1f
-                );
-            }
-        );
+        return lottery;
     }
 
-    public static void PlayAnimation()
+    public static void EnterAnimation()
     {
         ManaReso.Get("Bc_Lottery").TweenForCG();
         ManaReso.Get("Ba_Notice0").TweenBacCG();
 
-        CreateLottery(ManaReso.Get("Bc_LotteryItem1"));
-        CreateLottery(ManaReso.Get("Bc_LotteryItem2"));
-        CreateLottery(ManaReso.Get("Bc_LotteryItem3"));
-        
+        float random = Random.Range(0f, 1f);
+
+        for (int i = 0; i < RateList.Count; i++)
+        {
+            if (random <= RateList.MySum(f => f, i + 1))
+            {
+                TempTypeList.Add(TypeList[i]);
+                TempTypeList.AddRange(TypeList.Random(2, true, false, type => !TempTypeList.Contains(type)));
+
+                break;
+            }
+        }
+
+        TempLotteryList.Add(CreateLottery(TempTypeList[0], 0, ManaReso.Get("Bc_LotteryItem1")));
+        TempLotteryList.Add(CreateLottery(TempTypeList[1], 1, ManaReso.Get("Bc_LotteryItem2")));
+        TempLotteryList.Add(CreateLottery(TempTypeList[2], 2, ManaReso.Get("Bc_LotteryItem3")));
+
+        List<Vector3> posList = PosList.Disturb();
+
+        TempLotteryList[0].Item.position = posList[0];
+        TempLotteryList[1].Item.position = posList[1];
+        TempLotteryList[2].Item.position = posList[2];
+
         Button button1 = ManaReso.Get<Button>("Bc_LotteryBack1");
         Button button2 = ManaReso.Get<Button>("Bc_LotteryBack2");
         Button button3 = ManaReso.Get<Button>("Bc_LotteryBack3");
@@ -587,11 +567,9 @@ public class Lottery
                 button2.interactable = true;
                 button3.interactable = true;
 
-                List<Vector3> posList = PosList.Disturb();
-
-                ManaReso.Get("Bc_LotteryItem1").Move2D(posList[0], 0.25f, false, Curve.EaseOutQuad);
-                ManaReso.Get("Bc_LotteryItem2").Move2D(posList[1], 0.25f, false, Curve.EaseOutQuad);
-                ManaReso.Get("Bc_LotteryItem3").Move2D(posList[2], 0.25f, false, Curve.EaseOutQuad);
+                ManaReso.Get("Bc_LotteryItem1").Move2D(PosList[0], 0.25f, false, Curve.EaseOutQuad);
+                ManaReso.Get("Bc_LotteryItem2").Move2D(PosList[1], 0.25f, false, Curve.EaseOutQuad);
+                ManaReso.Get("Bc_LotteryItem3").Move2D(PosList[2], 0.25f, false, Curve.EaseOutQuad);
             },
             2f
         );
@@ -608,9 +586,11 @@ public class Lottery
         );
     }
 
-    public static void EndLottery()
+    public static void EndAnimation()
     {
-        ValueList = new List<int>();
+        TempTypeList = new List<int>();
+        TempValueList = new List<int>();
+        TempLotteryList = new List<Lottery>();
 
         ManaReso.Get("Bc_Lab").TweenBacCG();
         ManaReso.Get("Bc_Confirm").TweenBacCG();
@@ -626,6 +606,42 @@ public class Lottery
     }
 
 
+    public static void OnClick(int index)
+    {
+        ManaAudio.PlayClip(Clip.CurrentClip);
+
+        ManaReso.Get<Button>("Bc_LotteryBack1").interactable = false;
+        ManaReso.Get<Button>("Bc_LotteryBack2").interactable = false;
+        ManaReso.Get<Button>("Bc_LotteryBack3").interactable = false;
+
+        TempLotteryList[0].Item.TweenBacEuler();
+
+        TempLotteryList[0].BK.SetActive(true);
+
+        TempLotteryList[0].GetAward();
+
+        List<Vector3> posList = new List<Vector3>(PosList);
+        posList.Remove(PosList[index]);
+        posList = posList.Disturb();
+
+        TempLotteryList[0].Item.position = PosList[index];
+        TempLotteryList[1].Item.position = posList[0];
+        TempLotteryList[2].Item.position = posList[1];
+
+        Auxiliary.Instance.DelayCall
+            (
+                () =>
+                {
+                    ManaReso.Get("Bc_Confirm").TweenForCG();
+
+                    ManaReso.Get("Bc_LotteryItem1").TweenBacEuler();
+                    ManaReso.Get("Bc_LotteryItem2").TweenBacEuler();
+                    ManaReso.Get("Bc_LotteryItem3").TweenBacEuler();
+                },
+                1f
+            );
+    }
+
     public void GetAward()
     {
         Sign.ResetSign();

+ 20 - 1
Assets/Script/Manage/ManaUI.cs

@@ -234,7 +234,7 @@ public class ManaUI : Regist
         tween.PingPong = true;
         tween.StartForward();
 
-        ManaReso.SetButtonEvent("Bc_Confirm", Lottery.EndLottery);
+        ManaReso.SetButtonEvent("Bc_Confirm", Lottery.EndAnimation);
 
         #endregion
 
@@ -2325,6 +2325,25 @@ public class ManaUI : Regist
 
         #endregion
 
+        #region P_Return
+
+        ManaReso.SetButtonEvent
+            (
+                "P_Return",
+                () => Bubble.Show
+                    (
+                        null, Language.GetStr("UI", "P_Return"),
+                        null,
+                        () =>
+                        {
+                            ManaPlayer.Player.Save();
+                            ManaReso.Get("K_Bubble").GetTweenGra().InOrigin = true;
+                        }
+                    )
+            );
+        
+        #endregion
+
 
         #region Pa_Info
 

+ 1 - 12
Assets/Script/Tool/AtlasUtil/ExtList.cs

@@ -98,20 +98,9 @@ public static class ExtList
 
     public static List<T> Disturb<T>(this List<T> list)
     {
-        int antiCrush = 0;
-
         List<T> resultList = new List<T>();
-        List<T> originList = new List<T>(list);
 
-        while (originList.Count > 0)
-        {
-            if (antiCrush++ > 10000)
-            {
-                throw new Exception();
-            }
-
-            resultList.Add(originList.Random(1, true, true)[0]);
-        }
+        resultList.AddRange(list.Random(list.Count));
 
         return resultList;
     }

+ 4 - 2
Assets/Script/Tool/Auxiliary.cs

@@ -161,9 +161,11 @@ public class Auxiliary : Regist
 
         if (Input.GetKeyDown(KeyCode.X))
         {
-            Lottery.ValueList = new List<int>();
+            Lottery.TempTypeList = new List<int>();
+            Lottery.TempValueList = new List<int>();
+            Lottery.TempLotteryList = new List<Lottery>();
 
-            Lottery.PlayAnimation();
+            Lottery.EnterAnimation();
 
             //ManaReso.Get("Bc_LotteryItem1").TweenForEuler();
             //ManaReso.Get("Bc_LotteryItem2").TweenForEuler();

+ 14 - 0
Assets/Test.cs

@@ -0,0 +1,14 @@
+using System.Collections;
+using System.Collections.Generic;
+
+using System.IO;
+//using UnityEditor;
+using UnityEngine;
+
+public class Test// : AssetPostprocessor
+{
+    static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
+    {
+        
+    }
+}

+ 12 - 0
Assets/Test.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1c6f408c17233a4468f641ac7515b46c
+timeCreated: 1501211200
+licenseType: Pro
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 3 - 3
ToList.txt

@@ -1,6 +1,4 @@
-一种类型的一个
-
-覆盖安装不能更新逻辑?
+防止删除 删除前事件 HideFlag
 
 
 还原PlayerConfig
@@ -22,4 +20,6 @@
 //更新版本号
 
 
+移除AnySDK
+
 分享appid申请