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