1 decade ago by wicht
It would be nice if the distanceTo and angleTo Methods would be separated into two methods.
One that calculates the distance/angle with any given x and y positions.
And one which takes another entity just like the current methods (and utilizes the x,y-version of the methods). That would be a bit nicer than duplicating code to achieve e.g. movement towards a given point (mouse). Using a pseudo-entity with pos and size members is possible atm, but thats not so nice either.
One that calculates the distance/angle with any given x and y positions.
And one which takes another entity just like the current methods (and utilizes the x,y-version of the methods). That would be a bit nicer than duplicating code to achieve e.g. movement towards a given point (mouse). Using a pseudo-entity with pos and size members is possible atm, but thats not so nice either.