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

namespace DoomDeathmatch.Component.MVC.View;

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

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

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