SCROLLDynamic

trait SCROLLDynamic extends Dynamic

This Trait enables dynamic invocation of role methods that are not natively available on the player object.

trait Dynamic
class Object
trait Matchable
class Any
class Player[W]

Value members

Abstract methods

def applyDynamic[E](name: String)(args: Any*)(using dispatchQuery: DispatchQuery): Either[SCROLLError, E]

Allows to call a function with arguments.

Allows to call a function with arguments.

Type Params
E

return type

Value Params
args

the arguments handed over to the given function

dispatchQuery

the dispatch rules that should be applied

name

the function name

Returns

the result of the function call or an appropriate error

def applyDynamicNamed[E](name: String)(args: (String, Any)*)(using dispatchQuery: DispatchQuery): Either[SCROLLError, E]

Allows to call a function with named arguments.

Allows to call a function with named arguments.

Type Params
E

return type

Value Params
args

tuple with the the name and argument handed over to the given function

dispatchQuery

the dispatch rules that should be applied

name

the function name

Returns

the result of the function call or an appropriate error

def selectDynamic[E](name: String)(using dispatchQuery: DispatchQuery): Either[SCROLLError, E]

Allows to read a field.

Allows to read a field.

Type Params
E

return type

Value Params
dispatchQuery

the dispatch rules that should be applied

name

of the field

Returns

the result of the field access or an appropriate error

def updateDynamic(name: String)(value: Any)(using dispatchQuery: DispatchQuery): Unit

Allows to write field updates.

Allows to write field updates.

Value Params
dispatchQuery

the dispatch rules that should be applied

name

of the field

value

the new value to write