public void Inject(PlayerUnitDI di) { physics = di.physics; stateMachine = di.stateMachine; hp = di.hp; vulnerability = di.vulnerability; }
public void Inject(PlayerUnitDI di) { controller = di.controller; stats = di.stats; unitHandler = di.mainDi.unitHandler; hp = di.hp; physics = di.physics; camera = di.camera; }
public void Inject(PlayerUnitDI di) { physics = di.physics; stateMachine = di.stateMachine; unitHandler = di.mainDi.unitHandler; input = di.mainDi.controller.input; stats = di.stats; hp = di.hp; }
public void UpdateUnit(PlayerUnitController unitController) { if (hp) { hp.OnHpUpdate -= OnHpUpdate; } hp = unitController.di.hp; hp.OnHpUpdate += OnHpUpdate; UpdateUI(); }
public void Inject(PlayerUnitDI di) { hp = di.hp; damage = di.damage; PlayerBaseStats stats = di.stats; OnStatsChange(stats); if (stats.OnChange != null) { stats.OnChange += OnStatsChange; } }