选择萌妖对应属性显示对应萌妖

This commit is contained in:
wulongxiao 2024-12-27 22:03:22 +08:00
parent 3ded50706b
commit 8659ac7910
5 changed files with 892 additions and 262 deletions

File diff suppressed because it is too large Load Diff

View File

@ -33,6 +33,8 @@ public class Battle_Selection : BaseUI
public Button tiaoScene;
public List<Button> Btns;
// Start is called before the first frame update
async void Start()
{
@ -158,4 +160,22 @@ public class Battle_Selection : BaseUI
// 开始动画
mySequence.Play();
}
public void ShowCardOfShuixing(int shuxing)
{
foreach (Button key in MengyaoCard)
{
if (shuxing==-1)
{
key.gameObject.SetActive(true);
}
else if (key.GetComponent<CardInfo>().shuxing == shuxing)
{
key.gameObject.SetActive(true);
}
else
{
key.gameObject.SetActive(false);
}
}
}
}

View File

@ -5,4 +5,5 @@ using UnityEngine;
public class CardInfo : MonoBehaviour
{
public string mengyaoid;
[Header("属性")]public int shuxing;
}

View File

@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class BTN : MonoBehaviour
{
public Button btn;
public int shuxing;
// Start is called before the first frame update
void Start()
{
btn.onClick.AddListener(() => { });
}
// Update is called once per frame
void Update()
{
}
}

View File

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