feat(battle-engine): copy-loop closure to 3282 files (member-surface frontier)
This commit is contained in:
59
SVSim.BattleEngine/Engine/Wizard/GatheringMemberPlate.cs
Normal file
59
SVSim.BattleEngine/Engine/Wizard/GatheringMemberPlate.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using Cute;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class GatheringMemberPlate : UserPlateBase
|
||||
{
|
||||
[SerializeField]
|
||||
private UIButton _friendRequestButton;
|
||||
|
||||
[SerializeField]
|
||||
private UIButton _dropOutButton;
|
||||
|
||||
[SerializeField]
|
||||
private UIButton _kickButton;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _ownerOrGuestLabel;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _friendRequestSending;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _friendIcon;
|
||||
|
||||
public Action<GatheringUserInfo> OnClickFriendRequest;
|
||||
|
||||
public Action OnClickDropOut;
|
||||
|
||||
public Action<GatheringUserInfo> OnClickKick;
|
||||
|
||||
public void Initialize(GatheringInfo info, GatheringUserInfo userInfo)
|
||||
{
|
||||
InitializeBase(userInfo);
|
||||
_dropOutButton.gameObject.SetActive(info.Role == GatheringRule.eRole.GUEST && userInfo.IsSelf);
|
||||
_friendRequestButton.gameObject.SetActive(userInfo.IsFriend == false && !userInfo.IsSelf && userInfo.IsFriendRequestSending == false);
|
||||
_friendIcon.SetActive(userInfo.IsFriend.Value);
|
||||
_friendRequestSending.SetActive(userInfo.IsFriendRequestSending.Value);
|
||||
_kickButton.gameObject.SetActive(info.Role == GatheringRule.eRole.OWNER && !userInfo.IsSelf);
|
||||
_friendRequestButton.onClick.Clear();
|
||||
_dropOutButton.onClick.Clear();
|
||||
_kickButton.onClick.Clear();
|
||||
_friendRequestButton.onClick.Add(new EventDelegate(delegate
|
||||
{
|
||||
OnClickFriendRequest.Call(userInfo);
|
||||
}));
|
||||
_dropOutButton.onClick.Add(new EventDelegate(delegate
|
||||
{
|
||||
OnClickDropOut.Call();
|
||||
}));
|
||||
_kickButton.onClick.Add(new EventDelegate(delegate
|
||||
{
|
||||
OnClickKick.Call(userInfo);
|
||||
}));
|
||||
SystemText systemText = Data.SystemText;
|
||||
_ownerOrGuestLabel.text = (userInfo.IsOwner ? systemText.Get("Gathering_Information_0013") : systemText.Get("Gathering_Member_0001"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user