using DoomDeathmatch.Script.Model.Enemy;
using Engine.Graphics.Texture;
using Engine.Scene.Component.BuiltIn.Renderer;
using Engine.Util;

namespace DoomDeathmatch.Component.MVC.Enemy;

public class EnemyView : Engine.Scene.Component.Component
{
  private readonly Box2DRenderer _box2DRenderer;

  public EnemyView(Box2DRenderer parBox2DRenderer)
  {
    _box2DRenderer = parBox2DRenderer;
  }

  public void UpdateView(EnemyData parEnemyData)
  {
    _box2DRenderer.Texture = EngineUtil.AssetResourceManager.Load<Texture>(parEnemyData.Texture);
  }
}