2020-07-04 00:48:31 -04:00
|
|
|
package d2interface
|
|
|
|
|
2020-07-21 08:51:09 -04:00
|
|
|
import "github.com/OpenDiablo2/OpenDiablo2/d2common/d2math/d2vector"
|
|
|
|
|
2020-07-04 00:48:31 -04:00
|
|
|
// MapEntity is something that can be positioned on and rendered on the game map
|
|
|
|
type MapEntity interface {
|
2020-08-05 21:27:45 -04:00
|
|
|
ID() string
|
2020-07-04 00:48:31 -04:00
|
|
|
Render(target Surface)
|
|
|
|
Advance(tickTime float64)
|
2020-07-21 08:51:09 -04:00
|
|
|
GetPosition() d2vector.Position
|
|
|
|
GetVelocity() d2vector.Vector
|
2020-08-01 19:03:09 -04:00
|
|
|
GetSize() (width, height int)
|
2020-07-04 00:48:31 -04:00
|
|
|
GetLayer() int
|
|
|
|
GetPositionF() (float64, float64)
|
2020-08-02 21:26:07 -04:00
|
|
|
Label() string
|
2020-07-04 00:48:31 -04:00
|
|
|
Selectable() bool
|
|
|
|
Highlight()
|
|
|
|
}
|