Skip to content

Instantly share code, notes, and snippets.

@todorok1
Last active January 21, 2025 10:44
Show Gist options
  • Select an option

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

Select an option

Save todorok1/0cee0f181231192ffdac53517931a05f to your computer and use it in GitHub Desktop.
シンプルRPGチュートリアル第14回 行動パターンの条件を定義するクラス
using UnityEngine;
using System;
namespace SimpleRpg
{
/// <summary>
/// 行動パターンの条件を定義するクラスです。
/// </summary>
[Serializable]
public class EnemyConditionRecord
{
/// <summary>
/// 条件のカテゴリです。
/// </summary>
public ConditionCategory conditionCategory;
/// <summary>
/// 条件を比較する演算子です。
/// </summary>
public ComparisonOperator comparisonOperator;
/// <summary>
/// ターン数の条件の値です。
/// </summary>
[Header("ターン数の条件を0以上の整数で指定します。")]
public int turnCriteria;
/// <summary>
/// HP残量の条件の値です。
/// </summary>
[Header("HP残量の割合を%で0から100の間で指定します。")]
[Range(0, 100)]
public float hpRateCriteria;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment