mustachebutter / GodotAutoSurvival

0 stars 0 forks source link

[BUG] Offset got reset everytime there's a new instance of damage #18

Closed mustachebutter closed 4 months ago

mustachebutter commented 4 months ago

Describe the bug Currently there's a bug because I moved the translation of the text into DamageNumberComponent. However, in theory it should makes sense for architecture. What we are doing right now is by re-instantiate the DamageNumberComponent everytime and add them to the tree every single time there's an instance of damage.

Expected behavior I think what we should do is that, for offsetting the text. Have _textOffset to be outside of DamageNumberComponent and pass that value in OffsetText(float value)

mustachebutter commented 4 months ago

Fix by passing offset value to the method!