trait LevelContext extends EventWrapperObservable[MouseEventWrapper] with EntitiesDrawer with GameStateHolder
Trait modelling the context of a level
- Alphabetic
- By Inheritance
- LevelContext
- GameStateHolder
- EventWrapperObserver
- EntitiesDrawer
- EventWrapperObservable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
drawEntities(playerEntity: Option[DrawableWrapper], entities: Seq[DrawableWrapper]): Unit
Called whenever the entities must be drawn
Called whenever the entities must be drawn
- playerEntity
the player entity. It may be empty
- entities
the other entities
- Definition Classes
- EntitiesDrawer
-
abstract
def
gameCurrentState: GameStateEventWrapper
A generic definition of the game state
A generic definition of the game state
- returns
a GameStateEventWrapper
- Definition Classes
- GameStateHolder
-
abstract
def
getPlayerUUID: String
The UUID of the current player, used to discriminate between different users
The UUID of the current player, used to discriminate between different users
- returns
Some(uuid) if it's defined and the current game mode is not simulation; otherwise None.
- Definition Classes
- LevelContext → EntitiesDrawer
-
abstract
val
levelContextType: LevelContextType.Value
The level context type
-
abstract
def
notify(event: GameStateEventWrapper): Unit
Called on a event T type
-
abstract
def
notifyMouseEvent(event: MouseEventWrapper): Unit
Called when the LevelContext gets a mouse event from the scene
Called when the LevelContext gets a mouse event from the scene
- event
the mouse event
-
abstract
def
setListener(levelContextListener: LevelContextListener): Unit
Setter.
Setter. Sets the level context listener
- levelContextListener
the level context listener
-
abstract
def
setPlayerUUID(playerUUID: String): Unit
Sets the current player uuid.
-
abstract
def
setupLevel(mapShape: MapShape): Unit
Called once at the beginning at the level.
Called once at the beginning at the level. Manages the context setup
- mapShape
the level shape
-
abstract
def
subscribe(eventWrapperObserver: EventWrapperObserver[MouseEventWrapper]): Unit
This method subscribes a single event observer
This method subscribes a single event observer
- eventWrapperObserver
the observer
- Definition Classes
- EventWrapperObservable
-
abstract
def
unsubscribe(eventWrapperObserver: EventWrapperObserver[MouseEventWrapper]): Unit
This method unsubscribes a single event observer
This method unsubscribes a single event observer
- eventWrapperObserver
the observer
- Definition Classes
- EventWrapperObservable
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
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
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- 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
- @native() @throws( ... )