Local room variables class. Will not be saved if the room is persistent.

Constructor

Methods

inline decrease (key:String, ?value:Int):Void

Decreases Int value by a given amount.

Parameters:

key

Variable name.

value

Amount to decrease by. Defaults to 1.

getDynamic (key:String):Dynamic

Returns variable value as Dynamic.

Parameters:

key

Variable name.

Returns:

Variable value. Returns null, if this variable is not found.

getFloat (key:String):Float

Returns variable value as Float.

Parameters:

key

Variable name.

Returns:

Variable value. Returns 0, if this variable is not found.

getInt (key:String):Int

Returns variable value as Int.

Parameters:

key

Variable name.

Returns:

Variable value. Returns 0, if this variable is not found.

getString (key:String):String

Returns variable value as String.

Parameters:

key

Variable name.

Returns:

Variable value. Returns an empty string if the variable does not exist.

inline increase (key:String, ?value:Int):Void

Increases Int value by a given amount.

Parameters:

key

Variable name.

value

(optional) Amount to increase by. Defaults to 1.

set (key:String, val:Dynamic):Void

Sets variable to a given value. If the new value equals the old one, nothing happens. If the new value is 0, the variable will be deleted.

Parameters:

key

Variable name.

val

New value.