Skip to content

Instantly share code, notes, and snippets.

@Ahtram
Last active December 5, 2023 10:14
Show Gist options
  • Save Ahtram/a489d541de5270e13f83900d437e865f to your computer and use it in GitHub Desktop.
Save Ahtram/a489d541de5270e13f83900d437e865f to your computer and use it in GitHub Desktop.
status_info
人物數值狀態取用指引 (基本上會是四捨五入整數,差別只在於有些有後綴 % 符號)
=== 以下為示意用 API ===
//-------- 左側欄位
AttackPower:
Mathf.RoundToInt(battleStates.AttackPower()).ToString()
ArmDef:
Mathf.RoundToInt(battleStates.GetProperty(BattleStates.Property.AmrDef)).ToString()
MaxAP:
battleStates.MaxAP.toString()
ShieldLV:
Mathf.RoundToInt(battleStates.GetProperty(BattleStates.Property.ShieldLevel)).ToString()
Critical:
Mathf.RoundToInt(battleStates.CriticalRate() * 100.0f).toString() + "%"
Block:
Mathf.RoundToInt(battleStates.BlockRate() * 100.0f).toString() + "%"
//--------
Str:
Mathf.RoundToInt(battleStates.GetProperty(BattleStates.Property.Str)).ToString()
Vit:
Mathf.RoundToInt(battleStates.GetProperty(BattleStates.Property.Vit)).ToString()
Dex:
Mathf.RoundToInt(battleStates.GetProperty(BattleStates.Property.Dex)).ToString()
Spi:
Mathf.RoundToInt(battleStates.GetProperty(BattleStates.Property.Spi)).ToString()
Luk:
Mathf.RoundToInt(battleStates.GetProperty(BattleStates.Property.Luk)).ToString()
WeightCapacity:
Mathf.RoundToInt(battleStates.GetProperty(BattleStates.Property.WeightCapacity)).ToString()
//-------- 右側欄位
// Enhancement [分類]以及[來源]顯示:
//[1]. 狀態(含天氣): 使用 StatusEffect Icon / Name
// 其中配對的 StatusEffect 為來源狀態效果
Dictionary<Enhancement, StatusEffect> statusEffectEnhancements = battleStates.GetStatusEffectEnhancements()
Texture2D icon = StatusEffect.Texture2D()
String name = StatusEffect.LocalizedName()
String desc = Enhancement.LocalizedFunctionsDesc()
//[2]. 隊伍: 來源隊友與其天賦 使用 SaveCharacter Icon / Enhancement Name + SaveCharacter Name
// 其中配對的 SaveCharacter 為來源隊友
Dictionary<Enhancement, SaveCharacter> appliedPartyEnhancements = battleStates.GetAppliedPartyEnhancements()
Texture2D icon = Enhancement.IconTexture2D()
String name = Enhancement.LocalizedName() + SaveCharacter.LocalizedName()
String desc = Enhancement.LocalizedFunctionsDesc()
//[3]. 裝備: 來源裝備 Item Icon / Name
// 其中配對的 SlottedItem 為來源裝備
Dictionary<Enhancement, SlottedItem> equipmentEnhancements = battleStates.GetEquipmentEnhancements()
Texture2D icon = SlottedItem.IconTexture2D()
String name = Enhancement.LocalizedName() + SlottedItem.LocalizedName()
String desc = Enhancement.LocalizedFunctionsDesc()
//[4]. 自身 天賦/模態: Enhancement Icon / Name
// 只需要用 Enhancement 的 IconTexture2D() 與 LocalizedName()
List<Enhancement> stanceTalentEnhancements = battleStates.GetStanceTalentEnhancements()
Texture2D icon = Enhancement.IconTexture2D()
String name = Enhancement.LocalizedName()
String desc = Enhancement.LocalizedFunctionsDesc()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment