1
This commit is contained in:
@@ -4112,6 +4112,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 245637205031072731}
|
||||
- component: {fileID: 3607119520064869763}
|
||||
- component: {fileID: 9216461727086189505}
|
||||
m_Layer: 5
|
||||
m_Name: GameMainPanelXJMH
|
||||
m_TagString: Untagged
|
||||
@@ -4261,7 +4262,37 @@ MonoBehaviour:
|
||||
btn_BluePT: {fileID: 6960561258226760454}
|
||||
btn_GoldPT: {fileID: 7017233470151915259}
|
||||
btn_VIPPT: {fileID: 5022068518759764265}
|
||||
goldColumnController: {fileID: 0}
|
||||
goldColumnController: {fileID: 9216461727086189505}
|
||||
--- !u!114 &9216461727086189505
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2856141562549588388}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8241b2fef05a1194085a61f39c0d2deb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
maxColumns: 5
|
||||
crowdThreshold: 3
|
||||
deltaX: 40
|
||||
offsetX: 100
|
||||
seatOffset: {x: 0, y: 0}
|
||||
heightCap: 255
|
||||
scoreDivisor: 2
|
||||
barHeightToPanelRatio: 0.47
|
||||
fullValue: 0
|
||||
maxBarHeightOverride: 0
|
||||
growDuration: 0.3
|
||||
holdDuration: 2
|
||||
shiftDuration: 0.17
|
||||
fadeDuration: 0.3
|
||||
crowdDelay: 1
|
||||
preloadNum: 4
|
||||
selfTemplateName: PW_GoldColumn_Self
|
||||
otherTemplateName: PW_GoldColumn_Other
|
||||
--- !u!1 &2865408747225355556
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -29,10 +29,10 @@ public class GoldColumnController : MonoBehaviour
|
||||
public int crowdThreshold = 3;
|
||||
[Tooltip("相邻柱的横向间距(像素)")]
|
||||
public float deltaX = 40f;
|
||||
[Tooltip("首柱相对座位锚点的横向外偏(像素)")]
|
||||
[Tooltip("首柱相对座位的横向外偏(像素)")]
|
||||
public float offsetX = 100f;
|
||||
[Tooltip("柱底相对座位锚点的纵向偏移(像素)")]
|
||||
public float seatAnchorOffsetY = 0f;
|
||||
[Tooltip("首柱相对座位位置的偏移(X/Y,像素):X 左右挪、Y 抬高/降低(往上调大即离底边更远)")]
|
||||
public Vector2 seatOffset = Vector2.zero;
|
||||
|
||||
[Header("高度映射(沿用 PW 公式)")]
|
||||
[Tooltip("高度封顶值:score/scoreDivisor 达到此值即顶格")]
|
||||
@@ -238,9 +238,9 @@ public class GoldColumnController : MonoBehaviour
|
||||
// 文本(原版 Lua: self.num:SetText(ChangeUnit(num)))
|
||||
SetNum(item, ChangeUnit(pending.earn));
|
||||
|
||||
// 位置:座位锚点 + 方向 × (首柱外偏 + 序号间距)
|
||||
float x = pending.basePos.x + pending.sign * (offsetX + item.index * deltaX);
|
||||
float y = pending.basePos.y + seatAnchorOffsetY;
|
||||
// 位置:座位位置 + 可调偏移(seatOffset) + 方向 × (首柱外偏 + 序号间距)
|
||||
float x = pending.basePos.x + seatOffset.x + pending.sign * (offsetX + item.index * deltaX);
|
||||
float y = pending.basePos.y + seatOffset.y;
|
||||
item.rt.anchoredPosition = new Vector2(x, y);
|
||||
|
||||
// 高度:默认沿用 PW 公式 score=earn/炮倍 → mul=score/scoreDivisor → 封顶归一化;
|
||||
|
||||
Reference in New Issue
Block a user