mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-02-11 02:58:10 -05:00
362147848d
* entity debug rendering, with command needed to add getter method to MapEntity interface, so that's the reasoning for changing objects/npcs/player/etc this currently brings allocs/s up to 10 (you can check by running `fps` command, se we need to look into d2debugutils and how it handles drawing text * reverting velocity copy, broke the map entity tests. debug display wont show velocity currently. * adding velocity debug
17 lines
414 B
Go
17 lines
414 B
Go
package d2interface
|
|
|
|
import "github.com/OpenDiablo2/OpenDiablo2/d2common/d2math/d2vector"
|
|
|
|
// MapEntity is something that can be positioned on and rendered on the game map
|
|
type MapEntity interface {
|
|
Render(target Surface)
|
|
Advance(tickTime float64)
|
|
GetPosition() d2vector.Position
|
|
GetVelocity() d2vector.Vector
|
|
GetLayer() int
|
|
GetPositionF() (float64, float64)
|
|
Name() string
|
|
Selectable() bool
|
|
Highlight()
|
|
}
|