final class Hero[H] extends CanvasComponent[H]
CanvasComponent
's implementation for to visual Hero sprite on the canvas.
- H
Numeric generic abstraction
- Alphabetic
- By Inheritance
- Hero
- CanvasComponent
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Hero[H], B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def copy(pos: Position[H]): Hero[H]
- def copy(canvas: Canvas): Hero[H]
-
def
copy(img: HTMLImageElement): Hero[H]
- Definition Classes
- Hero → CanvasComponent
- def ensuring(cond: (Hero[H]) ⇒ Boolean, msg: ⇒ Any): Hero[H]
- def ensuring(cond: (Hero[H]) ⇒ Boolean): Hero[H]
- def ensuring(cond: Boolean, msg: ⇒ Any): Hero[H]
- def ensuring(cond: Boolean): Hero[H]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(that: Any): Boolean
- Definition Classes
- CanvasComponent → AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
val
img: HTMLImageElement
- Definition Classes
- Hero → CanvasComponent
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isValidPosition(canvas: Canvas): Boolean
Check if the square area is within the rectangle area of the
<canvas>
Check if the square area is within the rectangle area of the
<canvas>
- canvas
Canvas where to
- returns
False if a square out of bound
- Attributes
- protected[nl.amsscala.simplegame]
-
def
keyEffect(latency: Double, keysDown: Set[Int]): Hero[H]
Compute new position of hero according to the keys pressed
Compute new position of hero according to the keys pressed
- latency
Time since previous update.
- keysDown
Set of the keys pressed.
- returns
Computed move Hero
- Attributes
- protected[nl.amsscala.simplegame]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
val
pos: Position[H]
- Definition Classes
- Hero → CanvasComponent
-
def
src: String
- Definition Classes
- Hero → CanvasComponent
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- CanvasComponent → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def →[B](y: B): (Hero[H], B)
This is the documentation for a simple HTML5 Canvas game written in Scala, and cross compiled to run in the browser targeting the HTML5 Canvas.
See also:
Package structure
Notable packages include:
nl.amsscala.simplegame