1
This commit is contained in:
parent
ad36dd46cb
commit
41c538c28a
@ -37314,9 +37314,9 @@ RectTransform:
|
|||||||
- {fileID: 8086681985000168470}
|
- {fileID: 8086681985000168470}
|
||||||
m_Father: {fileID: 903966777167520147}
|
m_Father: {fileID: 903966777167520147}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 667, y: -69.642}
|
m_AnchoredPosition: {x: 127, y: 463.358}
|
||||||
m_SizeDelta: {x: 1080, y: 109}
|
m_SizeDelta: {x: 1080, y: 109}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!1 &3182275938344351334
|
--- !u!1 &3182275938344351334
|
||||||
|
@ -280,7 +280,7 @@ namespace GameLogic
|
|||||||
|
|
||||||
// 创建一个玩家头像出来
|
// 创建一个玩家头像出来
|
||||||
UIPlayerHeadItem actorHItem = CreateWidgetByPrefab<UIPlayerHeadItem>(m_itemHeadItem, m_rectHeadRt, true);
|
UIPlayerHeadItem actorHItem = CreateWidgetByPrefab<UIPlayerHeadItem>(m_itemHeadItem, m_rectHeadRt, true);
|
||||||
actorHItem.OnInit(unitPlayerData);
|
actorHItem.OnInit(unitPlayerData,true);
|
||||||
|
|
||||||
actorHItem.transform.SetParent(m_rectCar.transform);
|
actorHItem.transform.SetParent(m_rectCar.transform);
|
||||||
actorHItem.transform.localPosition = new Vector3(-1500, 0, 0);
|
actorHItem.transform.localPosition = new Vector3(-1500, 0, 0);
|
||||||
@ -320,11 +320,6 @@ namespace GameLogic
|
|||||||
UIPlayerAddNumItem actorHItem = CreateWidgetByPrefab<UIPlayerAddNumItem>
|
UIPlayerAddNumItem actorHItem = CreateWidgetByPrefab<UIPlayerAddNumItem>
|
||||||
(m_itemAddNum, m_rectNao, true);
|
(m_itemAddNum, m_rectNao, true);
|
||||||
//actorHItem.OnInit(data);
|
//actorHItem.OnInit(data);
|
||||||
|
|
||||||
|
|
||||||
await UniTask.Delay(2000);
|
|
||||||
// 特效播放完毕后销毁
|
|
||||||
GameObject.Destroy(actorHItem.gameObject);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (buff.m_Id == 2)
|
else if (buff.m_Id == 2)
|
||||||
|
@ -128,7 +128,7 @@ namespace GameLogic
|
|||||||
// 计算位置
|
// 计算位置
|
||||||
r.anchorMin = new Vector2(0.5f, 0.5f);
|
r.anchorMin = new Vector2(0.5f, 0.5f);
|
||||||
r.anchorMax = new Vector2(0.5f, 0.5f);
|
r.anchorMax = new Vector2(0.5f, 0.5f);
|
||||||
r.anchoredPosition = new Vector2(0, 435 - 65 - i * (109 - 5f));
|
r.anchoredPosition = new Vector2(127, 435 - 65 - i * (109 - 5f));
|
||||||
r.localPosition = new Vector3(r.localPosition.x, r.localPosition.y, 0);
|
r.localPosition = new Vector3(r.localPosition.x, r.localPosition.y, 0);
|
||||||
actorHItem.OnInit(i);
|
actorHItem.OnInit(i);
|
||||||
DataGameSceneManager.Instance.m_DicTeamList.Add((i + 1).ToString(), actorHItem);
|
DataGameSceneManager.Instance.m_DicTeamList.Add((i + 1).ToString(), actorHItem);
|
||||||
@ -602,7 +602,7 @@ namespace GameLogic
|
|||||||
var hItemActor = hItemActors[i].actor;
|
var hItemActor = hItemActors[i].actor;
|
||||||
//hItemActor.m_Index = i;
|
//hItemActor.m_Index = i;
|
||||||
var rectTransform = hItemActor.gameObject.GetComponent<RectTransform>();
|
var rectTransform = hItemActor.gameObject.GetComponent<RectTransform>();
|
||||||
Vector2 targetPosition = new Vector2(0, 435 - i * (109 - 5f));
|
Vector2 targetPosition = new Vector2(127, 435 - i * (109 - 5f));
|
||||||
targetPositions[rectTransform] = targetPosition;
|
targetPositions[rectTransform] = targetPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,15 +5,15 @@ using Cysharp.Threading.Tasks;
|
|||||||
|
|
||||||
namespace GameLogic
|
namespace GameLogic
|
||||||
{
|
{
|
||||||
[Window(UILayer.UI)]
|
[Window(UILayer.UI)]
|
||||||
class UIPlayerHeadItem : UIWidget
|
class UIPlayerHeadItem : UIWidget
|
||||||
{
|
{
|
||||||
#region 脚本工具生成的代码
|
#region 脚本工具生成的代码
|
||||||
private Image m_imgHeadIcon;
|
private Image m_imgHeadIcon;
|
||||||
protected override void ScriptGenerator()
|
protected override void ScriptGenerator()
|
||||||
{
|
{
|
||||||
m_imgHeadIcon = FindChildComponent<Image>("Mask/m_imgHeadIcon");
|
m_imgHeadIcon = FindChildComponent<Image>("Mask/m_imgHeadIcon");
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 事件
|
#region 事件
|
||||||
@ -29,12 +29,15 @@ namespace GameLogic
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void OnInit(UnitPlayerData playerData)
|
public void OnInit(UnitPlayerData playerData, bool isDestroy = false)
|
||||||
{
|
{
|
||||||
// 设置头像
|
// 设置头像
|
||||||
AsyncImageDownload.Instance.SetAsyncImage(playerData.protCustMessageData.imgURL, m_imgHeadIcon);
|
AsyncImageDownload.Instance.SetAsyncImage(playerData.protCustMessageData.imgURL, m_imgHeadIcon);
|
||||||
|
|
||||||
UniTask.Delay(5000).ContinueWith(() => { Destroy(); });
|
if (isDestroy)
|
||||||
|
{
|
||||||
|
UniTask.Delay(5000).ContinueWith(() => { Destroy(); });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user