- Assets/_Game/ 하위로 게임 에셋 통합 - External/ 패키지 벤더별 분류 (Synty, Animations, UI) - 에셋 네이밍 컨벤션 확립 및 적용 (Data_Skill_, Data_SkillEffect_, Prefab_, Anim_, Model_, BT_ 등) - pre-commit hook으로 네이밍 컨벤션 자동 검사 추가 - RESTRUCTURE_CHECKLIST.md 작성 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 lines
774 B
C#
26 lines
774 B
C#
using System;
|
|
using UnityEngine;
|
|
using Unity.Behavior;
|
|
using Unity.Properties;
|
|
using Condition = Unity.Behavior.Condition;
|
|
|
|
namespace Colosseum.AI.BehaviorActions.Conditions
|
|
{
|
|
/// <summary>
|
|
/// 무작위 확률로 성공/실패를 반환합니다.
|
|
/// </summary>
|
|
[Serializable, GeneratePropertyBag]
|
|
[NodeDescription(name: "Random Chance", story: "Random chance of [Chance] percent", category: "Utility")]
|
|
public partial class RandomChanceCondition : Condition
|
|
{
|
|
[SerializeReference]
|
|
public BlackboardVariable<float> Chance = new BlackboardVariable<float>(50f);
|
|
|
|
public override bool IsTrue()
|
|
{
|
|
float roll = UnityEngine.Random.Range(0f, 100f);
|
|
return roll <= Chance.Value;
|
|
}
|
|
}
|
|
}
|