BurningTimesAi/공유/개발팀_백업/EerieVillage/PlayerEnemyCollision.cs.bak...

53 lines
1.4 KiB
C#
Raw Permalink 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 Platformer.Core;
using Platformer.Mechanics;
using Platformer.Model;
using UnityEngine;
using static Platformer.Core.Simulation;
namespace Platformer.Gameplay
{
/// <summary>
/// Fired when a Player collides with an Enemy.
/// </summary>
/// <typeparam name="EnemyCollision"></typeparam>
public class PlayerEnemyCollision : Simulation.Event<PlayerEnemyCollision>
{
public EnemyController enemy;
public PlayerController player;
PlatformerModel model = Simulation.GetModel<PlatformerModel>();
public override void Execute()
{
var willHurtEnemy = player.Bounds.center.y >= enemy.Bounds.max.y;
if (willHurtEnemy)
{
var enemyHealth = enemy.GetComponent<Health>();
if (enemyHealth != null)
{
enemyHealth.Decrement();
if (!enemyHealth.IsAlive)
{
Schedule<EnemyDeath>().enemy = enemy;
player.Bounce(2);
}
else
{
player.Bounce(7);
}
}
else
{
Schedule<EnemyDeath>().enemy = enemy;
player.Bounce(2);
}
}
else
{
Schedule<PlayerDeath>();
}
}
}
}