i want to make a floating text when i damaged the enemy how do i do that?
Develop games in your browser. Powerful, performant & highly capable.
Like this?
You could simply spawn a text or sprite-text object , add a fade behavior and maybe have it lerp upwards on y each tick?
I made an example -
johnnysix.net/archive_games/HitMe
download
johnnysix.net/archive_games/HitMe.capx
Tap to hit keys to apply damage, also did a quick hit effect + health bar example.