Big push to implement 10mp fluid simulations.
This commit is contained in:
51
elements/mappedentitybase.go
Normal file
51
elements/mappedentitybase.go
Normal file
@@ -0,0 +1,51 @@
|
||||
package elements
|
||||
|
||||
import (
|
||||
"fluids/gamedata"
|
||||
|
||||
"github.com/hajimehoshi/ebiten/v2"
|
||||
)
|
||||
|
||||
type MappedEntityBase struct {
|
||||
Sprite *ebiten.Image
|
||||
dimensions gamedata.Vector
|
||||
position gamedata.Vector
|
||||
paused bool
|
||||
}
|
||||
|
||||
func NewMappedEntityBase(dimensions gamedata.Vector) *MappedEntityBase {
|
||||
meb := &MappedEntityBase{
|
||||
dimensions: dimensions,
|
||||
}
|
||||
return meb
|
||||
}
|
||||
|
||||
func (m *MappedEntityBase) Draw() {
|
||||
}
|
||||
|
||||
func (m *MappedEntityBase) Update() {
|
||||
}
|
||||
|
||||
func (m *MappedEntityBase) GetSprite() *ebiten.Image {
|
||||
return m.Sprite
|
||||
}
|
||||
|
||||
func (m *MappedEntityBase) GetDimensions() gamedata.Vector {
|
||||
return m.dimensions
|
||||
}
|
||||
|
||||
func (m *MappedEntityBase) GetPosition() gamedata.Vector {
|
||||
return m.position
|
||||
}
|
||||
|
||||
func (m *MappedEntityBase) SetPosition(pos gamedata.Vector) {
|
||||
m.position = pos
|
||||
}
|
||||
|
||||
func (m *MappedEntityBase) SetPaused(p bool) {
|
||||
m.paused = p
|
||||
}
|
||||
|
||||
func (m *MappedEntityBase) Paused() bool {
|
||||
return m.paused
|
||||
}
|
||||
Reference in New Issue
Block a user