"게임 로직은 건들지 않고 UI만 갈아끼우는 설계" 1. 왜 UI와 로직을 분리해야 하나? using TMPro; using UnityEngine; public class Enemy : MonoBehaviour { public int hp = 100; public TextMeshProUGUI hpText; public void OnDamge(int damage) { hp -= damage; hpText.text = "HP:" + hp.ToString(); if(hp <= 0) { Debug.Log("Enemy 죽음.."); } } } 유지보수 지옥 - 프로젝트 커질 시 추적 불가 (어딨어..?) 2. MVC vs MVP 사용자 입력이 Controller로 전달. 의존성: View가 Model을 직접 참조 사용자의 입력이 View를 통해 들어와서 Presenter로 전달. 의존성: View와 Model 사이에 참조가 전혀 없음 (의존 안함) 3-1.
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile