加入很多新内容,这波一块交了
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
%YAML 1.1
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
@@ -92,7 +92,7 @@ MonoBehaviour:
|
||||
- tierName: "\u6F84\u660E\u5883"
|
||||
equipmentSprite: {fileID: 21300000, guid: 814f39e3a1e204c4586f75b514a06601, type: 3}
|
||||
tierDescription:
|
||||
- tierName: "\u5FC3\u517B\u5F52\u4E00"
|
||||
- tierName: "\u5FC3\u517B\u5F52\u4E00\u5492"
|
||||
equipmentSprite: {fileID: 21300000, guid: 4ce68bd00ecc6f64baefd01ce27f33f9, type: 3}
|
||||
tierDescription:
|
||||
- tierName: "\u68A6\u9192\xB7\u65E0\u5C18\u771F\u5883"
|
||||
|
||||
@@ -139,19 +139,27 @@ public class chooseSkillPrefab : MonoBehaviour, IPointerEnterHandler, IPointerEx
|
||||
detailPinnedByButton = pinnedByButton;
|
||||
detailOpenedFrame = Time.frameCount;
|
||||
|
||||
Transform parent = transform.root != null ? transform.root : transform;
|
||||
Transform parent = ResolveDetailParent();
|
||||
spawnedDetail = Instantiate(sskilldetialPrefab, parent);
|
||||
spawnedDetail.transform.SetAsLastSibling();
|
||||
|
||||
RectTransform selfRect = transform as RectTransform;
|
||||
RectTransform detailRect = spawnedDetail.transform as RectTransform;
|
||||
RectTransform parentRect = parent as RectTransform;
|
||||
if (selfRect != null && detailRect != null && parentRect != null)
|
||||
{
|
||||
Canvas canvas = parent.GetComponentInParent<Canvas>();
|
||||
Camera eventCamera = null;
|
||||
if (canvas != null && canvas.renderMode != RenderMode.ScreenSpaceOverlay)
|
||||
{
|
||||
eventCamera = canvas.worldCamera;
|
||||
}
|
||||
|
||||
Vector3 worldPoint = selfRect.TransformPoint(new Vector3(selfRect.rect.xMax, selfRect.rect.center.y, 0f));
|
||||
RectTransformUtility.ScreenPointToLocalPointInRectangle(
|
||||
parentRect,
|
||||
RectTransformUtility.WorldToScreenPoint(null, worldPoint),
|
||||
null,
|
||||
RectTransformUtility.WorldToScreenPoint(eventCamera, worldPoint),
|
||||
eventCamera,
|
||||
out Vector2 localPoint);
|
||||
detailRect.anchoredPosition = localPoint + detailPrefabOffset;
|
||||
}
|
||||
@@ -163,6 +171,22 @@ public class chooseSkillPrefab : MonoBehaviour, IPointerEnterHandler, IPointerEx
|
||||
}
|
||||
}
|
||||
|
||||
private Transform ResolveDetailParent()
|
||||
{
|
||||
Canvas canvas = GetComponentInParent<Canvas>();
|
||||
if (canvas != null && canvas.rootCanvas != null)
|
||||
{
|
||||
return canvas.rootCanvas.transform;
|
||||
}
|
||||
|
||||
if (transform.root != null)
|
||||
{
|
||||
return transform.root;
|
||||
}
|
||||
|
||||
return transform;
|
||||
}
|
||||
|
||||
private bool IsPointerInside(Vector2 screenPoint)
|
||||
{
|
||||
if (IsScreenPointInside(transform as RectTransform, screenPoint))
|
||||
|
||||
@@ -195,6 +195,11 @@ public class equipSmelt : MonoBehaviour
|
||||
SavePersistentState();
|
||||
}
|
||||
|
||||
public void RefreshPlayerSkillAdjustedUi()
|
||||
{
|
||||
RefreshAllUi();
|
||||
}
|
||||
|
||||
public void SetDragPreviewVisible(bool visible)
|
||||
{
|
||||
if (dragObj == null)
|
||||
@@ -382,6 +387,7 @@ public class equipSmelt : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
int grantedFragments = Mathf.Max(0, pendingDirectFragmentsState);
|
||||
if (pendingDirectFragmentsState > 0)
|
||||
{
|
||||
PlayerEconomyLedger.EnsureInstance().AddMaterial(pendingDirectFragmentsState);
|
||||
@@ -398,6 +404,11 @@ public class equipSmelt : MonoBehaviour
|
||||
SavePersistentState();
|
||||
RefreshAllSmeltPools();
|
||||
RefreshAllEquipBags();
|
||||
|
||||
if (grantedFragments > 0)
|
||||
{
|
||||
gItemGet.display(gItemGet.Create("记忆碎片", ResolveMemoryFragmentSprite(), grantedFragments, ItemRarity.Uncommon));
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleGetRewardClicked()
|
||||
@@ -530,10 +541,30 @@ public class equipSmelt : MonoBehaviour
|
||||
ReinstateRewardEquipment(generated);
|
||||
storedSmeltEnergyState = Mathf.Max(0, storedSmeltEnergyState - requiredAmount);
|
||||
SavePersistentState();
|
||||
gItemGet.display(gItemGet.FromEquipment(generated, 1));
|
||||
RefreshAllUi();
|
||||
RefreshAllEquipBags();
|
||||
}
|
||||
|
||||
private static Sprite ResolveMemoryFragmentSprite()
|
||||
{
|
||||
equipSmelt[] instances = FindObjectsByType<equipSmelt>(FindObjectsInactive.Include, FindObjectsSortMode.None);
|
||||
if (instances == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
for (int i = 0; i < instances.Length; i++)
|
||||
{
|
||||
if (instances[i] != null && instances[i].memoryFragment != null)
|
||||
{
|
||||
return instances[i].memoryFragment;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void HandleRewardSelectorClosed()
|
||||
{
|
||||
activeCtasInstance = null;
|
||||
@@ -959,12 +990,14 @@ public class equipSmelt : MonoBehaviour
|
||||
|
||||
private int GetQuickFinishCost()
|
||||
{
|
||||
return ssrso != null ? Mathf.Max(0, ssrso.quickFinishCost) : 0;
|
||||
int baseCost = ssrso != null ? Mathf.Max(0, ssrso.quickFinishCost) : 0;
|
||||
return PlayerSkillService.ModifySmeltCoinCost(baseCost);
|
||||
}
|
||||
|
||||
private int GetStartSmeltCost()
|
||||
{
|
||||
return ssrso != null ? Mathf.Max(0, ssrso.startSmeltCost) : 0;
|
||||
int baseCost = ssrso != null ? Mathf.Max(0, ssrso.startSmeltCost) : 0;
|
||||
return PlayerSkillService.ModifySmeltCoinCost(baseCost);
|
||||
}
|
||||
|
||||
private smeltStageRewardSO.SmeltStageRewardRequirement GetSelectedRewardRequirement()
|
||||
|
||||
@@ -120,6 +120,10 @@ public class equipmentRandomTestButton : MonoBehaviour
|
||||
GenerateSpecialEffects(generated);
|
||||
GenerateIllusionEffects(generated);
|
||||
lastGeneratedEquipment = PersistGeneratedEquipment(generated);
|
||||
if (lastGeneratedEquipment != null)
|
||||
{
|
||||
gItemGet.display(gItemGet.FromEquipment(lastGeneratedEquipment, 1));
|
||||
}
|
||||
BuildSummary(generated);
|
||||
RefreshEquipmentList();
|
||||
MarkHostDirty();
|
||||
|
||||
@@ -41,4 +41,25 @@ public class esDesPrefab : MonoBehaviour
|
||||
skill_story.gameObject.SetActive(!string.IsNullOrWhiteSpace(storyText));
|
||||
}
|
||||
}
|
||||
|
||||
public void Bind(string displayName, Sprite icon, string description, string story)
|
||||
{
|
||||
if (skillProfile != null)
|
||||
{
|
||||
skillProfile.sprite = icon;
|
||||
skillProfile.enabled = icon != null;
|
||||
}
|
||||
|
||||
if (skillName != null)
|
||||
skillName.text = displayName ?? string.Empty;
|
||||
|
||||
if (skillDescription != null)
|
||||
skillDescription.text = description ?? string.Empty;
|
||||
|
||||
if (skill_story != null)
|
||||
{
|
||||
skill_story.text = story ?? string.Empty;
|
||||
skill_story.gameObject.SetActive(!string.IsNullOrWhiteSpace(skill_story.text));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 124.06795, y: -57}
|
||||
m_AnchoredPosition: {x: 124.06795, y: -80}
|
||||
m_SizeDelta: {x: 208.1359, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2049021961984502307
|
||||
@@ -68,7 +68,7 @@ MonoBehaviour:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: bd4be44636ad6c24a9b117a7108a75e9, type: 3}
|
||||
m_FontSize: 10
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 1
|
||||
@@ -211,7 +211,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0.88235295}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0.9411765}
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 0
|
||||
@@ -244,7 +244,7 @@ MonoBehaviour:
|
||||
m_Left: 20
|
||||
m_Right: 0
|
||||
m_Top: 57
|
||||
m_Bottom: 10
|
||||
m_Bottom: 16
|
||||
m_ChildAlignment: 0
|
||||
m_Spacing: 0
|
||||
m_ChildForceExpandWidth: 1
|
||||
@@ -379,7 +379,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 124.06795, y: -57}
|
||||
m_AnchoredPosition: {x: 124.06795, y: -93}
|
||||
m_SizeDelta: {x: 208.1359, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2792857840598114499
|
||||
@@ -473,7 +473,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 124.06795, y: -57}
|
||||
m_AnchoredPosition: {x: 124.06795, y: -65}
|
||||
m_SizeDelta: {x: 208.1359, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1487207466561665800
|
||||
|
||||
Reference in New Issue
Block a user