备份CatanBuilding瘦身独立工程
This commit is contained in:
54
Assets/Scripts/UI/FishingTarget/FishingTargetPopupPanel.cs
Normal file
54
Assets/Scripts/UI/FishingTarget/FishingTargetPopupPanel.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using asap.core;
|
||||
using cfg;
|
||||
|
||||
public class FishingTargetPopupPanel : FishingTargetPopupPanelBase
|
||||
{
|
||||
public TargetInfoBase curTargetInfoBase;
|
||||
public TargetInfoBase targetInfoBase1;
|
||||
public TargetInfoBase targetInfoBase2;
|
||||
public TargetInfoBase targetInfoBase3;
|
||||
protected override void Awake()
|
||||
{
|
||||
targetInfoBase1 = transform.Find("root/target_info1").GetComponent<TargetInfoBase>();
|
||||
targetInfoBase2 = transform.Find("root/target_info2").GetComponent<TargetInfoBase>();
|
||||
targetInfoBase3 = transform.Find("root/target_info3").GetComponent<TargetInfoBase>();
|
||||
base.Awake();
|
||||
}
|
||||
|
||||
protected override void SetTargetExtra(string icon)
|
||||
{
|
||||
EventTargetExtraDrop eventTargetExtraDrop = _fishingEventData.GetEventTargetExtraDrop();
|
||||
targetInfoBase1.gameObject.SetActive(false);
|
||||
targetInfoBase2.gameObject.SetActive(false);
|
||||
targetInfoBase3.gameObject.SetActive(false);
|
||||
if (eventTargetExtraDrop != null)
|
||||
{
|
||||
if (eventTargetExtraDrop is ETDropAfterDrop)
|
||||
{
|
||||
targetInfoBase2.SetData(eventTargetExtraDrop as ETDropAfterDrop);
|
||||
curTargetInfoBase = targetInfoBase2;
|
||||
}
|
||||
else if (eventTargetExtraDrop is ETNewItem)
|
||||
{
|
||||
targetInfoBase3.SetData(eventTargetExtraDrop as ETNewItem);
|
||||
curTargetInfoBase = targetInfoBase3;
|
||||
|
||||
}
|
||||
else if (eventTargetExtraDrop is ETDropByFish)
|
||||
{
|
||||
targetInfoBase1.SetData(eventTargetExtraDrop as ETDropByFish);
|
||||
curTargetInfoBase = targetInfoBase1;
|
||||
}
|
||||
}
|
||||
IUIService uIService = GContext.container.Resolve<IUIService>();
|
||||
for (int i = 0; i < curTargetInfoBase.icon_target.Count; i++)
|
||||
{
|
||||
uIService.SetImageSprite(curTargetInfoBase.icon_target[i], icon, BasePanel.PanelName);
|
||||
}
|
||||
}
|
||||
|
||||
//protected void OnDestroy()
|
||||
//{
|
||||
// UIManager.Instance.DestroyUI(UITypes.FishCardReviewPopupPanel);
|
||||
//}
|
||||
}
|
||||
Reference in New Issue
Block a user