属性格式修改提交

dev_chengFeng
jiaoyangna 2021-09-27 15:45:23 +08:00
parent 9137d9f592
commit 1d1e21a9e7
4 changed files with 212 additions and 55 deletions

View File

@ -74,7 +74,7 @@ MonoBehaviour:
m_FillClockwise: 0
m_FillOrigin: 2
m_UseSpriteMesh: 0
--- !u!1 &584935485214846376
--- !u!1 &1655912594037313271
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -82,77 +82,93 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8481571208259853425}
- component: {fileID: 7293966261192737673}
- component: {fileID: 3726372279095400459}
- component: {fileID: 148015055094331855}
- component: {fileID: 5559883810871526586}
- component: {fileID: 4595658054216599632}
- component: {fileID: 5654341923955379172}
m_Layer: 5
m_Name: progress
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8481571208259853425
--- !u!224 &148015055094331855
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 584935485214846376}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_GameObject: {fileID: 1655912594037313271}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 0.9999205, y: 0.9999205, z: 0.9999205}
m_Children: []
m_Father: {fileID: 2641095517172412257}
m_RootOrder: 3
m_Father: {fileID: 5601896589029272011}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -3.4, y: -113}
m_SizeDelta: {x: 256, y: 40.9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7293966261192737673
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 52.877026, y: -459.2291}
m_SizeDelta: {x: 632.2, y: 2}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &5559883810871526586
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 584935485214846376}
m_GameObject: {fileID: 1655912594037313271}
m_CullTransparentMesh: 0
--- !u!114 &3726372279095400459
--- !u!114 &4595658054216599632
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 584935485214846376}
m_GameObject: {fileID: 1655912594037313271}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.99215686, g: 0.92941177, b: 0.76862746, a: 1}
m_RaycastTarget: 1
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
m_FontSize: 28
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text:
m_Sprite: {fileID: 21300000, guid: 21e18b4111348a64684763f0a33d142c, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &5654341923955379172
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1655912594037313271}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &2025400677952665391
GameObject:
m_ObjectHideFlags: 0
@ -187,7 +203,7 @@ RectTransform:
- {fileID: 8843280134183422887}
- {fileID: 1148939108869446012}
- {fileID: 3436260046852721227}
- {fileID: 8481571208259853425}
- {fileID: 2834099657503461235}
m_Father: {fileID: 5601896589029272011}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -298,7 +314,7 @@ GameObject:
- component: {fileID: 7575507291051525301}
- component: {fileID: 5009944731236835870}
m_Layer: 5
m_Name: proScrollgrid
m_Name: proScrollgrid2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -320,8 +336,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 311.33502, y: -0.000023121529}
m_SizeDelta: {x: 622.67, y: 0}
m_AnchoredPosition: {x: 361.65, y: -0.000063164814}
m_SizeDelta: {x: 723.3, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &7575507291051525301
MonoBehaviour:
@ -360,6 +376,144 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_HorizontalFit: 0
m_VerticalFit: 2
--- !u!1 &2629332621075203760
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2834099657503461235}
- component: {fileID: 2422773188584772773}
- component: {fileID: 7948131933424439820}
m_Layer: 5
m_Name: progress
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2834099657503461235
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2629332621075203760}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2641095517172412257}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -3.4, y: -113}
m_SizeDelta: {x: 256, y: 40.9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2422773188584772773
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2629332621075203760}
m_CullTransparentMesh: 0
--- !u!114 &7948131933424439820
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2629332621075203760}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.99215686, g: 0.92941177, b: 0.76862746, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
m_FontSize: 28
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: <color=#5dc446>0</color>/200
--- !u!1 &2908756126063749889
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7702667814218864669}
- component: {fileID: 5193777316104093812}
m_Layer: 5
m_Name: proScrollgrid1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7702667814218864669
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2908756126063749889}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.99992025, y: 0.99992025, z: 0.99992025}
m_Children: []
m_Father: {fileID: 5601896589029272011}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 52.877014, y: -312.90015}
m_SizeDelta: {x: 703.62, y: 214.2}
m_Pivot: {x: 0, y: 1}
--- !u!114 &5193777316104093812
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2908756126063749889}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 0
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
m_ChildControlHeight: 0
--- !u!1 &3148512921626757698
GameObject:
m_ObjectHideFlags: 0
@ -653,6 +807,8 @@ RectTransform:
m_LocalScale: {x: 1.0000799, y: 1.0000799, z: 1.0000799}
m_Children:
- {fileID: 2641095517172412257}
- {fileID: 7702667814218864669}
- {fileID: 148015055094331855}
- {fileID: 7647837852959861211}
m_Father: {fileID: 7723528773779627565}
m_RootOrder: 2
@ -1261,12 +1417,12 @@ RectTransform:
m_Children:
- {fileID: 3818108209810798678}
m_Father: {fileID: 5601896589029272011}
m_RootOrder: 1
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 390.7, y: -312.9}
m_SizeDelta: {x: 675.7, y: 619.3}
m_AnchoredPosition: {x: 387, y: -473.6}
m_SizeDelta: {x: 706.8, y: 458.6}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &3558985047716541038
MonoBehaviour:

View File

@ -420,18 +420,18 @@ function this.SetProvalue(prolist,proType,tag,nextLv,indexType,_color)
for k,v in pairs(prolist) do
local str1 = ""
if proType == 1 then
str1 = PropertyConfig[k].Info..string.format("<color=#%s>+%s</color>",_color,GetPropertyFormatStrOne(PropertyConfig[k].Style, v) )
str1 = PropertyConfig[k].Info..string.format(" <color=#%s>+%s</color>",_color,GetPropertyFormatStrOne(PropertyConfig[k].Style, v) )
if nextLv and list[nextLv] then
local pro1 = LikabilityManager.GetProData(indexType,-1,nextLv)
if pro1[k] and pro1[k] > 0 then
str1 = str1.." "..string.format("<color=#%s>(下级额外 +%s)</color>",color1,pro1[k])
str1 = str1.." "..string.format("<color=#%s>(下级额外 +%s)</color>",color1,pro1[k])
end
end
else
LogGreen("k:"..k)
local config = ConfigManager.TryGetConfigDataByKey(ConfigName.PrivilegeTypeConfig,"PrivilegeType",k)
if config then
str1 = string.format(config.Name,string.format("<color=#%s>+%s</color>",_color,GetPropertyFormatStrOne(config.IfFloat, v)))
str1 = string.format(config.Name,string.format("<color=#%s>%s</color>\n",_color,GetEquipPropertyFormatStr(config.IfFloat, v)))
end
end
LogGreen("str1:"..str1)

View File

@ -17,7 +17,8 @@ function LikeabilityPopup:InitComponent()
self.progress = Util.GetGameObject(self.likeabilityBtn, "progress"):GetComponent("Text")
self.pro = Util.GetGameObject(self.transform, "pro")
self.proContent = Util.GetGameObject(self.pro, "content")
self.proGrid = Util.GetGameObject(self.transform, "scroll/proScroll/proScrollgrid")
self.proGrid1 = Util.GetGameObject(self.transform, "scroll/proScrollgrid1")
self.proGrid2 = Util.GetGameObject(self.transform, "scroll/proScroll/proScrollgrid2")
self.proList = {}
end
@ -64,19 +65,19 @@ function LikeabilityPopup:UpdateTopLayoutPanel()
end
function LikeabilityPopup:UpDataProList(lv)
local pro1 = LikabilityManager.GetViewProData(1,-1,lv,"<color=#fed97f>总好感度属性:</color>","","<color=#%s>全体%s\n全体%s</color>","",lv + 1)
local pro2 = LikabilityManager.GetViewProData(1,lv,lv,"<color=#fed97f>当前等级加成:</color>","<color=#%s>%s级</color>","<color=#%s>属性加成:%s %s</color>","<color=#%s>特权加成:%s</color>",nil,true)
local pro1 = LikabilityManager.GetViewProData(1,-1,lv,"<color=#fed97f>总好感度属性:</color>",""," <color=#%s>全体%s\n 全体%s</color>","",lv + 1)
local pro2 = LikabilityManager.GetViewProData(1,lv,lv,"<color=#fed97f> 当前等级加成:</color>","<color=#%s>%s级</color>","<color=#%s>属性加成:%s %s</color>","<color=#%s>特权加成:%s</color>",nil,true)
for i = 1,#self.proList do
self.proList[i].go.gameObject:SetActive(false)
end
self:UpDataProSingleList(pro1,1)
self:UpDataProSingleList(pro2,2)
self:UpDataProSingleList(pro1,1,self.proGrid1)
self:UpDataProSingleList(pro2,2,self.proGrid2)
end
function LikeabilityPopup:UpDataProSingleList(data,index)
function LikeabilityPopup:UpDataProSingleList(data,index,parent)
if not self.proList[index] then
self.proList[index] = {}
self.proList[index].go = newObjToParent(self.pro,self.proGrid)
self.proList[index].go = newObjToParent(self.pro,parent.transform)
self.proList[index].title = Util.GetGameObject(self.proList[index].go, "title"):GetComponent("Text")
self.proList[index].fenge = Util.GetGameObject(self.proList[index].go, "Image")
if index == 1 then

View File

@ -67,7 +67,7 @@ function RoleLikeabilityPopup:UpdateTopLayoutPanel()
end
function RoleLikeabilityPopup:UpDataProList(lv)
local pro2 = LikabilityManager.GetViewProData(self.curheroData.Id,lv,lv,"","<size=36><color=#%s>好感度%s级(%s/%s)</color></size>","<size=32><color=#%s>"..self.curheroData.ReadingName.." %s %s</color></size>","<size=32><color=#%s>特权加成:%s</color></size>",nil,true)
local pro2 = LikabilityManager.GetViewProData(self.curheroData.Id,lv,lv,"","<size=36><color=#%s>好感度%s级(%s/%s)</color></size>","<size=32><color=#%s>"..self.curheroData.ReadingName.." %s %s</color></size>\n","<size=32><color=#%s>特权加成:%s</color></size>",nil,true)
for i = 1,#self.proList do
self.proList[i].go.gameObject:SetActive(false)
end