加入UI补充

This commit is contained in:
DESKTOP-SAJ6RKV\Administrator 2025-05-09 00:35:25 +08:00
parent d158ee1c3d
commit 946a2ef581
12 changed files with 287 additions and 129 deletions

View File

@ -27,7 +27,7 @@ Transform:
m_GameObject: {fileID: 1012431290082542737} m_GameObject: {fileID: 1012431290082542737}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: -0.7071068, z: 0, w: 0.7071068} m_LocalRotation: {x: 0, y: -0.7071068, z: 0, w: 0.7071068}
m_LocalPosition: {x: -705, y: -10, z: 0} m_LocalPosition: {x: 0, y: -10, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
@ -4764,7 +4764,7 @@ ParticleSystemRenderer:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1012431290082542737} m_GameObject: {fileID: 1012431290082542737}
m_Enabled: 0 m_Enabled: 1
m_CastShadows: 0 m_CastShadows: 0
m_ReceiveShadows: 0 m_ReceiveShadows: 0
m_DynamicOccludee: 1 m_DynamicOccludee: 1
@ -9652,7 +9652,7 @@ ParticleSystemRenderer:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1859856362277195075} m_GameObject: {fileID: 1859856362277195075}
m_Enabled: 0 m_Enabled: 1
m_CastShadows: 0 m_CastShadows: 0
m_ReceiveShadows: 0 m_ReceiveShadows: 0
m_DynamicOccludee: 1 m_DynamicOccludee: 1
@ -9728,7 +9728,6 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 8897535720207111140} - component: {fileID: 8897535720207111140}
- component: {fileID: 8438179819792013000} - component: {fileID: 8438179819792013000}
- component: {fileID: 1672454992354150318}
m_Layer: 5 m_Layer: 5
m_Name: ADBZ m_Name: ADBZ
m_TagString: Untagged m_TagString: Untagged
@ -9745,7 +9744,7 @@ RectTransform:
m_GameObject: {fileID: 2824577169839544832} m_GameObject: {fileID: 2824577169839544832}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 65041789006977090} - {fileID: 65041789006977090}
@ -9764,46 +9763,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2824577169839544832} m_GameObject: {fileID: 2824577169839544832}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!114 &1672454992354150318
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2824577169839544832}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 16f0b0b6d0b7542bfbd20a3e05b04ff1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
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
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_IsTrail: 0
m_IgnoreCanvasScaler: 0
m_AbsoluteMode: 0
m_Scale3D: {x: 10, y: 10, z: 10}
m_AnimatableProperties: []
m_Particles:
- {fileID: 0}
- {fileID: 0}
- {fileID: 19464345355490029}
- {fileID: 8839049559151363932}
- {fileID: 1443586078035824756}
m_MeshSharing: 0
m_GroupId: 0
m_GroupMaxId: 0
m_PositionMode: 0
m_AutoScaling: 0
m_AutoScalingMode: 2
m_UseCustomView: 0
m_CustomViewSize: 10
m_TimeScaleMultiplier: 1
--- !u!1 &4995562779342638044 --- !u!1 &4995562779342638044
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -14626,7 +14585,7 @@ ParticleSystemRenderer:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4995562779342638044} m_GameObject: {fileID: 4995562779342638044}
m_Enabled: 0 m_Enabled: 1
m_CastShadows: 0 m_CastShadows: 0
m_ReceiveShadows: 0 m_ReceiveShadows: 0
m_DynamicOccludee: 1 m_DynamicOccludee: 1

View File

@ -11,7 +11,8 @@ Material:
m_Shader: {fileID: 4800000, guid: 8051d8a533a10b541a591e43ef313e96, type: 3} m_Shader: {fileID: 4800000, guid: 8051d8a533a10b541a591e43ef313e96, type: 3}
m_Parent: {fileID: 0} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0 m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords:
- _USEONEEM_ON
m_InvalidKeywords: [] m_InvalidKeywords: []
m_LightmapFlags: 4 m_LightmapFlags: 4
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0

View File

@ -11,7 +11,8 @@ Material:
m_Shader: {fileID: 4800000, guid: 8051d8a533a10b541a591e43ef313e96, type: 3} m_Shader: {fileID: 4800000, guid: 8051d8a533a10b541a591e43ef313e96, type: 3}
m_Parent: {fileID: 0} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0 m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords:
- _USEONEEM_ON
m_InvalidKeywords: [] m_InvalidKeywords: []
m_LightmapFlags: 4 m_LightmapFlags: 4
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0

View File

@ -11,7 +11,8 @@ Material:
m_Shader: {fileID: 4800000, guid: 8051d8a533a10b541a591e43ef313e96, type: 3} m_Shader: {fileID: 4800000, guid: 8051d8a533a10b541a591e43ef313e96, type: 3}
m_Parent: {fileID: 0} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0 m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords:
- _USEONEEM_ON
m_InvalidKeywords: [] m_InvalidKeywords: []
m_LightmapFlags: 4 m_LightmapFlags: 4
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0

View File

@ -11,7 +11,8 @@ Material:
m_Shader: {fileID: 4800000, guid: 8051d8a533a10b541a591e43ef313e96, type: 3} m_Shader: {fileID: 4800000, guid: 8051d8a533a10b541a591e43ef313e96, type: 3}
m_Parent: {fileID: 0} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0 m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords:
- _USEONEEM_ON
m_InvalidKeywords: [] m_InvalidKeywords: []
m_LightmapFlags: 4 m_LightmapFlags: 4
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0

View File

@ -11,7 +11,8 @@ Material:
m_Shader: {fileID: 4800000, guid: 8051d8a533a10b541a591e43ef313e96, type: 3} m_Shader: {fileID: 4800000, guid: 8051d8a533a10b541a591e43ef313e96, type: 3}
m_Parent: {fileID: 0} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0 m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords:
- _USEONEEM_ON
m_InvalidKeywords: [] m_InvalidKeywords: []
m_LightmapFlags: 4 m_LightmapFlags: 4
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0

View File

@ -75,6 +75,7 @@ GameObject:
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 6700229753991957502} - component: {fileID: 6700229753991957502}
- component: {fileID: 9127987029771401410}
m_Layer: 5 m_Layer: 5
m_Name: Join m_Name: Join
m_TagString: Untagged m_TagString: Untagged
@ -109,6 +110,20 @@ RectTransform:
m_AnchoredPosition: {x: -9.9, y: 331.8} m_AnchoredPosition: {x: -9.9, y: 331.8}
m_SizeDelta: {x: 100, y: 100} m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &9127987029771401410
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1371285011784465696}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b354256188e404448b40d3195b9c4150, type: 3}
m_Name:
m_EditorClassIdentifier:
m_PlayerName: {fileID: 4303635267066683384}
m_Info: {fileID: 160005308254124696}
--- !u!1 &2024393997831057017 --- !u!1 &2024393997831057017
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -2871,6 +2871,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 4655219308374456140} - {fileID: 4655219308374456140}
- {fileID: 9100389558934680694}
m_Father: {fileID: 1508900408836313865} m_Father: {fileID: 1508900408836313865}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
@ -3862,3 +3863,129 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 6403937887474270162, guid: 3c87f3ae07d99d64fa62efe33b26e010, type: 3} m_CorrespondingSourceObject: {fileID: 6403937887474270162, guid: 3c87f3ae07d99d64fa62efe33b26e010, type: 3}
m_PrefabInstance: {fileID: 1749071072740984990} m_PrefabInstance: {fileID: 1749071072740984990}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1001 &2499756593991139208
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 6805953989209425366}
m_Modifications:
- target: {fileID: 1371285011784465696, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_Name
value: Join
objectReference: {fileID: 0}
- target: {fileID: 1371285011784465696, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_AnchorMax.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_AnchorMax.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_AnchorMin.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_AnchorMin.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_SizeDelta.x
value: 100
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_SizeDelta.y
value: 100
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_AnchoredPosition.x
value: -9.9
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_AnchoredPosition.y
value: 331.8
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 1371285011784465696, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
insertIndex: -1
addedObject: {fileID: 171999324682489111}
m_SourcePrefab: {fileID: 100100000, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
--- !u!1 &3582370593861976744 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1371285011784465696, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
m_PrefabInstance: {fileID: 2499756593991139208}
m_PrefabAsset: {fileID: 0}
--- !u!114 &171999324682489111
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3582370593861976744}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b354256188e404448b40d3195b9c4150, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &9100389558934680694 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 6700229753991957502, guid: 7945afcaefa5a2945bddd43039739591, type: 3}
m_PrefabInstance: {fileID: 2499756593991139208}
m_PrefabAsset: {fileID: 0}

File diff suppressed because one or more lines are too long

View File

@ -145,27 +145,16 @@ namespace GameLogic
private void AddPlayerFunc(UnitPlayerData unitPlayerData) private void AddPlayerFunc(UnitPlayerData unitPlayerData)
{ {
//if (EventConts.gameStateType == GameStateType.个人赛)
//{
// // 生成横版
// CreateHItem(unitPlayerData.protCustMessageData.openId);
//}
//// 显示加入UI
//var jiaRuItem = GameObject.Instantiate(m_rect_JiaRuPanel.transform.GetChild(0));
//jiaRuItem.transform.SetParent(m_rect_JiaRuPanel);
//jiaRuItem.transform.localScale = Vector3.one * 1.5f;
//jiaRuItem.transform.localPosition = new Vector3(-258, 5, 0);
//jiaRuItem.gameObject.SetActive(true);
//jiaRuItem.GetComponent<UIJiaRuItem>().OnInit(unitPlayerData);
//var topTipsTime = GameObject.Instantiate(m_rect_TopTips.transform.GetChild(0)); // 显示加入UI
//topTipsTime.transform.SetParent(m_rect_TopTips); var jiaRuItem = GameObject.Instantiate(m_rect_GiftPanel.transform.GetChild(1));
//topTipsTime.transform.localScale = Vector3.one; jiaRuItem.transform.SetParent(m_rect_GiftPanel);
//topTipsTime.transform.localPosition = new Vector3(600, Random.Range(-70, 95)); jiaRuItem.transform.localScale = Vector3.one * 1.5f;
//topTipsTime.gameObject.SetActive(true); jiaRuItem.transform.localPosition = new Vector3(-258, 5, 0);
//topTipsTime.GetComponent<UITopTipsItem>().OnInit(unitPlayerData, null, 0); jiaRuItem.gameObject.SetActive(true);
jiaRuItem.GetComponent<UIJiaRuItem>().OnInit(unitPlayerData);
} }
/// <summary> /// <summary>

View File

@ -24,8 +24,8 @@ namespace GameLogic
public async void OnInit(UnitPlayerData unitPlayerData, GiftConfig giftConfig, int num) public async void OnInit(UnitPlayerData unitPlayerData, GiftConfig giftConfig, int num)
{ {
// 随机播放 //// 随机播放
GameModule.Audio.Play(TEngine.AudioType.UISound, "礼物UI弹窗" + Random.Range(1, 5)); //GameModule.Audio.Play(TEngine.AudioType.UISound, "礼物UI弹窗" + Random.Range(1, 5));
//m_Group.sprite = GameModule.Resource.LoadAsset<Sprite>("Z_lw_t_box_" + (giftConfig.Id - 1)); //m_Group.sprite = GameModule.Resource.LoadAsset<Sprite>("Z_lw_t_box_" + (giftConfig.Id - 1));

View File

@ -4,44 +4,26 @@ using Cysharp.Threading.Tasks;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using DG.Tweening; using DG.Tweening;
using TMPro;
namespace GameLogic namespace GameLogic
{ {
public class UIJiaRuItem : MonoBehaviour public class UIJiaRuItem : MonoBehaviour
{ {
private Text m_Name; public TextMeshProUGUI m_PlayerName;
private Text m_Info; public TextMeshProUGUI m_Info;
private GameObject m_Run;
void Awake() void Awake()
{ {
m_Name = transform.Find("Name").GetComponent<Text>(); m_PlayerName = transform.Find("Name").GetComponent<TextMeshProUGUI>();
m_Info = transform.Find("Info").GetComponent<Text>(); m_Info = transform.Find("Info").GetComponent<TextMeshProUGUI>();
m_Run = transform.Find("Run").gameObject;
} }
//public void OnInit(UnitPlayerData unitPlayerData) public void OnInit(UnitPlayerData unitPlayerData)
//{ {
// m_Name.text = unitPlayerData.protCustMessageData.nickName; m_PlayerName.text = unitPlayerData.protCustMessageData.nickName;
// m_Run.transform.DOLocalMoveX(78, 1f); m_Info.text = "李";
// if (EventConts.gameStateType == GameStateType.个人赛)
// {
// m_Info.text = "加入玩法";
// }
// else if (EventConts.gameStateType == GameStateType.团队赛)
// {
// m_Info.text = "加入" + DataGameSceneManager.Instance.GetStrs((int.Parse(unitPlayerData.teamId)));
// }
// transform.DOLocalMoveX(42, 0.25f).SetEase(Ease.Linear).OnComplete(async () =>
// {
// await UniTask.Delay(2500);
// if (this != null && this.gameObject != null && transform.parent != null)
// {
// Destroy(gameObject);
// }
// });
//} }
} }
} }