This commit is contained in:
杨号敬 2024-12-04 17:36:53 +08:00
commit 222235652e
22 changed files with 1294 additions and 216 deletions

View File

@ -110,7 +110,7 @@ AnimatorController:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Image
m_Name: Bain
serializedVersion: 5
m_AnimatorParameters:
- m_Name: State

View File

@ -83,7 +83,7 @@ AnimatorController:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Image
m_Name: Chao
serializedVersion: 5
m_AnimatorParameters:
- m_Name: State

View File

@ -31,7 +31,7 @@ AnimatorController:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Image
m_Name: DuYe
serializedVersion: 5
m_AnimatorParameters:
- m_Name: State

View File

@ -58,7 +58,7 @@ AnimatorController:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Image
m_Name: Gang
serializedVersion: 5
m_AnimatorParameters:
- m_Name: State

View File

@ -60,7 +60,7 @@ AnimatorController:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Image
m_Name: Lei
serializedVersion: 5
m_AnimatorParameters:
- m_Name: State

View File

@ -83,7 +83,7 @@ AnimatorController:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Image
m_Name: Mei
serializedVersion: 5
m_AnimatorParameters:
- m_Name: State

View File

@ -135,7 +135,7 @@ AnimatorController:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Image
m_Name: Mie
serializedVersion: 5
m_AnimatorParameters:
- m_Name: State

View File

@ -108,7 +108,7 @@ AnimatorController:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Image
m_Name: Zi
serializedVersion: 5
m_AnimatorParameters:
- m_Name: State

File diff suppressed because it is too large Load Diff

View File

@ -210,14 +210,23 @@ public class AllManeger : MonoBehaviour
{
knightBetResult = await queryKnightBetResult525.queryKnightBetResult(id);
GetSelfInfo();
if (knightBetResult.data.outcome==1)//價적
RacingSuccessPanel.instance.ShowImage();
RacingSuccessPanel.instance.ShowPanel();
if (knightBetResult.data.Count>0)
{
RacingSuccessPanel.instance.textSnailEggs.text = knightBetResult.data[0].win.ToString("F1");
}
else if (knightBetResult.data.outcome == 2)//呵겨
{
}
//if (knightBetResult.data[0].outcome==1)//ʤÀû
//{
// Debug.Log("ʤÀû");
//
//}
//else if (knightBetResult.data[0].outcome == 2)//ʧ°Ü
//{
// Debug.Log("ʧ°Ü");
// FailPanel.instance.ShowPanel();
//}
}

View File

@ -0,0 +1,19 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RacingFailPanel : RacingSuccessPanel
{
// Start is called before the first frame update
public override void Start()
{
base.Start();
}
// Update is called once per frame
void Update()
{
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c38533e7f7490144892661e17f2162a4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -10,6 +10,8 @@ public class RacingSuccessPanel : BasePanel
public static RacingSuccessPanel instance;
public TextMeshProUGUI textSnailEggs;//蜗牛蛋文本
public List<Image> images=new List<Image>();//显示蜗牛图片
public List<Sprite> sprites = new List<Sprite>();//ͼƬ¾«Áé
public List<RuntimeAnimatorController> animators = new List<RuntimeAnimatorController>();//ͼƬ¶¯»­
public override void Start()
{
instance = this;
@ -27,10 +29,53 @@ public class RacingSuccessPanel : BasePanel
{
if (AllManeger.instance.WinNos.Count==4)
{
foreach (Image image in images)
int index = 0;
for (int i = 1; i < images.Count; i++)
{
SetImage(AllManeger.instance.WinNos[index], images[i]);
if (index < AllManeger.instance.WinNos.Count - 1)
{
index++;
}
}
images[0].gameObject.SetActive(false);
images[1].gameObject.SetActive(true);
images[2].gameObject.SetActive(true);
images[3].gameObject.SetActive(true);
images[4].gameObject.SetActive(true);
}
else if (AllManeger.instance.WinNos.Count == 2)
{
int index = 0;
for (int i=1;i<images.Count;i++)
{
SetImage(AllManeger.instance.WinNos[index], images[i]);
if (index < AllManeger.instance.WinNos.Count - 1)
{
index++;
}
}
images[0].gameObject.SetActive(false);
images[1].gameObject.SetActive(true);
images[2].gameObject.SetActive(true);
images[3].gameObject.SetActive(false);
images[4].gameObject.SetActive(false);
}
else if (AllManeger.instance.WinNos.Count == 1)
{
}
SetImage(AllManeger.instance.WinNos[0], images[0]);
images[0].gameObject.SetActive(true);
images[1].gameObject.SetActive(false);
images[2].gameObject.SetActive(false);
images[3].gameObject.SetActive(false);
images[4].gameObject.SetActive(false);
}
}
@ -39,8 +84,36 @@ public class RacingSuccessPanel : BasePanel
switch (horseId)
{
case 1:
image.sprite = sprites[0];
image.gameObject.GetComponent<Animator>().runtimeAnimatorController = animators[0];
break;
case 2:
image.sprite = sprites[1];
image.gameObject.GetComponent<Animator>().runtimeAnimatorController = animators[1];
break;
case 3:
image.sprite = sprites[2];
image.gameObject.GetComponent<Animator>().runtimeAnimatorController = animators[2];
break;
case 4:
image.sprite = sprites[3];
image.gameObject.GetComponent<Animator>().runtimeAnimatorController = animators[3];
break;
case 5:
image.sprite = sprites[4];
image.gameObject.GetComponent<Animator>().runtimeAnimatorController = animators[4];
break;
case 6:
image.sprite = sprites[5];
image.gameObject.GetComponent<Animator>().runtimeAnimatorController = animators[5];
break;
case 7:
image.sprite = sprites[6];
image.gameObject.GetComponent<Animator>().runtimeAnimatorController = animators[6];
break;
case 8:
image.sprite = sprites[7];
image.gameObject.GetComponent<Animator>().runtimeAnimatorController = animators[7];
break;

View File

@ -41,7 +41,7 @@ public class queryKnightBetResult525 : MonoBehaviour
knightBetResult = JsonConvert.DeserializeObject<KnightBetResult>(response525);
if (knightBetResult != null && knightBetResult.data != null)//==================================================访问之前先判空未到或已过时间data[]为空
{
Debug.Log(knightBetResult.data.updateTime + "=525=8=======D");
Debug.Log(knightBetResult.data[0].updateTime + "=525=8=======D");
}
}
catch (Exception ex)
@ -57,7 +57,7 @@ public class queryKnightBetResult525 : MonoBehaviour
[Serializable]
public class KnightBetResult : Response
{
public KnightBetResultData data;
public List<KnightBetResultData> data;
[Serializable]
public class KnightBetResultData