Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created May 13, 2025 09:25
Show Gist options
  • Select an option

  • Save todorok1/f3fa34653852acbe9eb289e9c1e61ae3 to your computer and use it in GitHub Desktop.

Select an option

Save todorok1/f3fa34653852acbe9eb289e9c1e61ae3 to your computer and use it in GitHub Desktop.
シンプルRPGチュートリアル第75回 味方キャラクターのステータスをセットアップするクラス
/// <summary>
/// パーティの所持アイテムをセットします。
/// </summary>
void SetPartyItems()
{
CharacterStatusManager.partyItemInfoList = _partyItemInfoList;
}
/// <summary>
/// レベルに応じた経験値の値を取得します。
/// </summary>
int GetExp(int level)
{
int exp = 0;
var expTable = CharacterDataManager.GetExpTable();
if (expTable == null)
{
return exp;
}
var expRecord = expTable.expRecords.Find(record => record.level == level);
if (expRecord != null)
{
exp = expRecord.exp;
}
return exp;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment