Replies: 1 comment 6 replies
-
The main reason is backwards compatibility. we don't really know how many flixel use this feature and how many projects would be broken if this was removed. That said, I agree, health shouldn't be there.
I'm still dealing with people who haven't fixed small deprecation warnings introduced in 4.10. breaking changes will stop a lot of people in their tracks. we can only introduce breaking changes at major version releases and if we do it too often people just won't upgrade. Specifically removing the |
Beta Was this translation helpful? Give feedback.
-
Which fields do I propose to remove from
FlxObject
andFlxBasic
:object.health
object.hurt()
basic.alive
basic.kill()
basic.revive()
For example, I want the
health
parameter to be of theInt
type, but it is already occupied under theFloat
type. Another example: I want to create a method likehurt(damage:Int, knockback:Float)
, but this name is already taken and I can't add or change the arguments of the method, so I need to create other method with ugly name liketakeDamage(damage:Int, knockback:Float)
. It's inconvenientI also think that the
alive
parameter is pretty useless, because it won't be difficult for me to add customalive
parameter and thekill()
method myself (I may also need custom arguments in thekill()
method)If someone really needs these fields, then it seems to me that it will not be difficult for them to add them themselves (each field takes literally a couple lines of code) when switching to a new version of the engine
I may be wrong and this is purely my opinion, so I would like to hear yours :)
Beta Was this translation helpful? Give feedback.
All reactions