9 lines
234 B
Scala
9 lines
234 B
Scala
package fmon.draw
|
|
|
|
import scalafx.scene.image.{Image, ImageView}
|
|
|
|
class Sprite(var pose: String, val poses: Map[String, Drawable]) extends Drawable {
|
|
def draw(view: ImageView, t: Double): Unit = {
|
|
poses(pose).draw(view, t)
|
|
}
|
|
} |