Signup form

This commit is contained in:
2020-08-15 17:42:49 -04:00
parent a5363ac8dd
commit 089013e985
22 changed files with 7547 additions and 7 deletions

View File

@ -0,0 +1,29 @@
extends Reference
class_name NakamaAsyncResult
var exception : NakamaException setget _no_set, get_exception
var _ex = null
func _no_set(v):
return
func _init(p_ex = null):
_ex = p_ex
func is_exception():
return get_exception() != null
func get_exception() -> NakamaException:
return _ex as NakamaException
func _to_string():
if is_exception():
return get_exception()._to_string()
return "NakamaAsyncResult<>"
static func _safe_ret(p_obj, p_type : GDScript):
if p_obj is p_type:
return p_obj # Correct type
elif p_obj is NakamaException:
return p_type.new(p_obj) # It's an exception. Incapsulate it
return p_type.new(NakamaException.new()) # It's something else. generate an exception