[solved]Showing hp/maxhp up the enemy in a battle scene

Hello, I want to show the HP/MaxHP values in the enemy head in the battle scene, I think I have to make a plugin updating a rpg_sprite.js function.

Code:
(function() {
    var parameters = PluginManager.parameters('ROKI_ShowEnemyHP');
   
    Sprite_Enemy.prototype.update = function() {
        Sprite_Battler.prototype.update.call(this);
        if (this._enemy) {
            this.updateEffect();
            this.updateStateSprite();
            this.updateHPText();
        }
    };

    Sprite_Enemy.prototype.updateHPText = function() {
       
    };
   
})();

Correct me if I'm wrong... but I need the hp and maxhp from the current updating sprite (enemy) and then draw it, or something. I know there are addons for it but I want to do by myself and your help.

Thanks!

So I need to know how to get enemy info and draw it... but I think to draw it I need rpg_window right? I am a bit confused.

Edited the code
Hello, I want to show the HP/MaxHP values in the enemy head in the battle scene, I think I have to make a plugin updating a rpg_sprite.js function.

Code:
(function() {
    var parameters = PluginManager.parameters('ROKI_ShowEnemyHP');
  
    Sprite_Enemy.prototype.update = function() {
        Sprite_Battler.prototype.update.call(this);
        if (this._enemy) {
            this.updateEffect();
            this.updateStateSprite();
            this.updateHPText();
        }
    };

    Sprite_Enemy.prototype.updateHPText = function() {
      
    };
  
})();

Correct me if I'm wrong... but I need the hp and maxhp from the current updating sprite (enemy) and then draw it, or something. I know there are addons for it but I want to do by myself and your help.

Thanks!

So I need to know how to get enemy info and draw it... but I think to draw it I need rpg_window right? I am a bit confused.

Edited the code
Check you yanfly's (http://yanfly.moe/2015/11/21/yep-30-visual-hp-gauges/)
Yes, I found that but I want to do myself... I can try to understand but.... it's too complex , I am a begginer with this engine
I found a way to do this and is working:
Code:
/*:
 * @plugindesc Show the enemy HP during a battle
 * @author Alejandro López
 *
 */

(function() {
    var parameters = PluginManager.parameters('ROKI_ShowEnemyHP');
  
    Window_BattleEnemy.prototype.drawItem = function(index) {
        this.resetTextColor();
        var name = this._enemies[index].name();
        var rect = this.itemRectForText(index);
        var hpText = this._enemies[index]._hp + "/" + this._enemies[index].mhp;
        this.drawText(name + " " + hpText, rect.x, rect.y, rect.width);
    };
  
})();

Now I want to add colors, so I think this topic is already solved. It will show in the selecting enemy window. Like: Slime 10/20

Original thread: https://forums.rpgmakerweb.com/threads/solved-showing-hp-maxhp-up-the-enemy-in-a-battle-scene.82978/