Move all engine stuff to GoRetro. Still many interactions between game and engine code that there should not be.

This commit is contained in:
stevenhowes
2022-01-03 22:13:34 +00:00
commit 4d1ab58ca4
19 changed files with 976 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
package GoRetro
/*
* --------------------
* moverRotator
* --------------------
* A simple mover that rotates the container a fixed
* amount each tick
*/
type moverRotator struct {
container *Element
speed float64
}
func newMoverRotator(container *Element, speed float64) *moverRotator {
return &moverRotator{container: container, speed: speed}
}
func (mover *moverRotator) onDraw() error {
return nil
}
func (mover *moverRotator) onUpdate() error {
c := mover.container
c.Rotation += mover.speed * Delta
return nil
}
func (mover *moverRotator) onCollision(other *Element) error {
return nil
}