改了一个字体,然后修改了商店

This commit is contained in:
hyskai 2024-10-30 13:07:34 +08:00
parent fb16438f99
commit 52890f81d5
7 changed files with 3466 additions and 1511 deletions

File diff suppressed because it is too large Load Diff

View File

@ -4930,6 +4930,7 @@ GameObject:
- component: {fileID: 677323642}
- component: {fileID: 677323644}
- component: {fileID: 677323643}
- component: {fileID: 677323645}
m_Layer: 5
m_Name: Text (Legacy)
m_TagString: Untagged
@ -4970,7 +4971,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.2924528, g: 0.2924528, b: 0.2924528, a: 1}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
@ -4978,7 +4979,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_Font: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
m_FontSize: 30
m_FontStyle: 0
m_BestFit: 0
@ -4999,6 +5000,21 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 677323641}
m_CullTransparentMesh: 1
--- !u!114 &677323645
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 677323641}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
m_Name:
m_EditorClassIdentifier:
m_EffectColor: {r: 0, g: 0, b: 0, a: 1}
m_EffectDistance: {x: 1, y: -1}
m_UseGraphicAlpha: 1
--- !u!1 &682577002
GameObject:
m_ObjectHideFlags: 0

File diff suppressed because it is too large Load Diff

View File

@ -63,7 +63,7 @@ public class mount : MonoBehaviour
Debug.Log(response);
string response = await web.SendRequest("http://47.109.133.52/MinerElf/GetList", "POST");
//string response = await web.SendRequest("http://47.109.133.52/MinerElf/GetList", "POST");
Debug.Log(response);
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8c3c1537e81a85e44bd8ef050514d68c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,94 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ShopPanel : MonoBehaviour
{
public Button HeroBtn;
public Button WeaponsBtn;
public Button SeWeaponsBtn;
public Button PickupBtn;
public GameObject HeroContent;
public GameObject WeaponsContent;
public GameObject SeWeaponsContent;
public GameObject PickupContent;
public GameObject HightlightImage;//°´Å¥¸ßÁÁ
public List<GameObject> ContentList;
void Start()
{
HeroBtn.onClick.AddListener(OnClickHeroBtn);
WeaponsBtn.onClick.AddListener(OnClickWeaponsBtn);
SeWeaponsBtn.onClick.AddListener(OnClickSeWeaponsBtn);
PickupBtn.onClick.AddListener(OnClickPickupBtn);
BuildContentList();
ShowContent(ContentList, HeroContent);
}
void BuildContentList()
{
ContentList = new List<GameObject>();
ContentList.Add(HeroContent);
ContentList.Add(WeaponsContent);
ContentList.Add(SeWeaponsContent);
ContentList.Add(PickupContent);
}
void ShowContent(List<GameObject> contentList,GameObject current)
{
foreach (GameObject content in contentList)
{
if (content==current)
{
content.SetActive(true);
}
else
{
content.SetActive(false);
}
}
}
void SetChild(GameObject parent,GameObject child,int index=0)
{
child.transform.SetParent(parent.transform);
child.transform.SetSiblingIndex(0);
child.transform.localPosition = Vector3.zero;
}
void OnClickHeroBtn()
{
//ShowContent(ContentList, HeroContent);
SetChild(HeroBtn.gameObject, HightlightImage);
}
void OnClickWeaponsBtn()
{
//ShowContent(ContentList, WeaponsContent);
SetChild(WeaponsBtn.gameObject, HightlightImage);
}
void OnClickSeWeaponsBtn()
{
//ShowContent(ContentList, SeWeaponsContent);
SetChild(SeWeaponsBtn.gameObject, HightlightImage);
}
void OnClickPickupBtn()
{
//ShowContent(ContentList, PickupContent);
SetChild(PickupBtn.gameObject, HightlightImage);
}
}

View File

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