BurningTimesAi/공유/개발팀_백업/EerieVillage/Health.cs.bak_20260423_0201.cs

61 lines
1.5 KiB
C#
Raw Normal View History

feat(BT5-Dev·2단계 + BT6-Plan·Phase3B): 7 Agent 병렬 집행 + pm-auditor Critical·Major 정정 BT5-Dev 2단계 (개발팀 Agent · Unity MCP 미지원 환경에서 파일 직접 Edit ~90% 커버): - Unity 5종 편집 (PlayerAttack·AttackHitbox 신설, PlayerController·Health·PlayerEnemyCollision 개정) - InputSystem_Actions Attack 액션·SampleScene Alien→PlayerIdle GUID 교체 - i-frame 0.6s·마우스 좌 공격·밟기 판정 폐기 - 백업 5종 C6-1 표준 - 구현 보고 04_BT5-Dev_2단계_구현보고.md - PD 수동 4건 남음 (AttackHitbox·Enemy Health·Play 검증·Animator trigger) BT6-Plan Phase 3-B (기획팀 6개 전문 에이전트 병렬 · 14문서 2224 라인 · 기각 53건): - narrative 3종: 마을 안개골·보스 3종·해학 60/민속 30/공포 10 - system 2종: 카드 3티어·특성 A/B/C 3축·오행 태그 - content 3종: 카드 32·아이템 파츠 5종 21예시·특성 15종 - level 2종: 스테이지 5·보스 3 3페이즈 - balance 2종: 이동 6.0·i-frame 0.6s·XP 80+Lv×20 - ux 2종: 가상 스틱+버튼·HUD 3순위·Tier 2 편입 후보 PM 자진 정정: - feedback_pm_dev_task_delegation_failure.md 신설 (Unity MCP PD 전가 패턴 재발 방지) - pm-auditor Critical 6·Major 4 지적 반영: · 기각안 59→53건 실측 정정 (C5 정직성) · 라인수 2350→2224 정정 · BT6-Plan 진행중 복귀 (commit 후 아카이브 이동) · 개발팀 로그 BT5-Plan 오등록 제거 · 2026-04-22.md narrative-designer 일자 오판 정정 주석 · audit_pattern_analysis placeholder 정리 매니페스트: 2026-04-23_BT5BT6_일괄commit (27건) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 17:19:47 +00:00
using System;
using Platformer.Gameplay;
using UnityEngine;
using static Platformer.Core.Simulation;
namespace Platformer.Mechanics
{
/// <summary>
/// Represebts the current vital statistics of some game entity.
/// </summary>
public class Health : MonoBehaviour
{
/// <summary>
/// The maximum hit points for the entity.
/// </summary>
public int maxHP = 1;
/// <summary>
/// Indicates if the entity should be considered 'alive'.
/// </summary>
public bool IsAlive => currentHP > 0;
int currentHP;
/// <summary>
/// Increment the HP of the entity.
/// </summary>
public void Increment()
{
currentHP = Mathf.Clamp(currentHP + 1, 0, maxHP);
}
/// <summary>
/// Decrement the HP of the entity. Will trigger a HealthIsZero event when
/// current HP reaches 0.
/// </summary>
public void Decrement()
{
currentHP = Mathf.Clamp(currentHP - 1, 0, maxHP);
if (currentHP == 0)
{
var ev = Schedule<HealthIsZero>();
ev.health = this;
}
}
/// <summary>
/// Decrement the HP of the entitiy until HP reaches 0.
/// </summary>
public void Die()
{
while (currentHP > 0) Decrement();
}
void Awake()
{
currentHP = maxHP;
}
}
}