33 lines
1.5 KiB
Scala
33 lines
1.5 KiB
Scala
package tf.bug.fancade.tagless
|
|
|
|
trait Fanscript[F[_]] {
|
|
|
|
def unit: F[Unit]
|
|
def lift(b: Boolean): F[Boolean]
|
|
def lift(f: Float): F[Float]
|
|
def lift(v: Vector): F[Vector]
|
|
def lift(r: Rotation): F[Rotation]
|
|
def lift(o: Obj): F[Obj]
|
|
|
|
def win(stopProgram: Boolean)(andThen: () => F[Unit]): F[Unit]
|
|
def lose(stopProgram: Boolean)(andThen: () => F[Unit]): F[Unit]
|
|
def setScore(scoreMode: ScoreMode)(score: F[Float], andThen: () => F[Unit]): F[Unit]
|
|
def setCamera(position: F[Vector], rotation: F[Rotation], distance: F[Float], andThen: () => F[Unit]): F[Unit]
|
|
def setLight(position: F[Vector], rotation: F[Rotation], andThen: () => F[Unit]): F[Unit]
|
|
def screenSize: F[ScreenSize]
|
|
def accelerometer: F[Vector]
|
|
|
|
def getPosition(obj: F[Obj]): F[PosRot]
|
|
def setPosition(obj: F[Obj], position: F[Vector], rotation: F[Rotation], andThen: () => F[Unit]): F[Unit]
|
|
def rayCast(from: F[Vector], to: F[Vector]): F[RaycastResult]
|
|
def getSize(obj: F[Obj]): F[ObjSize]
|
|
def setVisible(obj: F[Obj], visible: F[Boolean], andThen: () => F[Unit]): F[Unit]
|
|
def createObj(original: F[Obj], andThen: (F[Obj]) => F[Unit]): F[Unit]
|
|
def destroyObj(obj: F[Obj], andThen: () => F[Unit]): F[Unit]
|
|
|
|
def playSound(loop: Boolean, sample: Sample)(volume: F[Float], pitch: F[Float], andThen: (F[Float]) => F[Unit]): F[Unit]
|
|
def stopSound(channel: F[Float], andThen: () => F[Unit]): F[Unit]
|
|
def volumePitch(channel: F[Float], volume: F[Float], pitch: F[Float], andThen: () => F[Unit]): F[Unit]
|
|
|
|
}
|