How use Rakugo Variables
Rakugo Variables are called RkVar for short. They are global, and accessible from both RkScript and GDScript.
RakuScript
You can define var in RakuScript file, like this:
You can access it in any RakuScript:GDScript
In GDScript you can define RkVars like this:
You can access it in any RakuScript: You can change it: You can display text with RkVar using Label like this:expand Label
func update_text():
var life = Rakugo.get_variable("player.life")
text = ("You have %d life points left" % life)
To auto-update text in label using sg_variable_changed
signal: