Fix variables in communication.gd
This commit is contained in:
parent
b24d3935f8
commit
9b216c61ef
2 changed files with 11 additions and 5 deletions
|
@ -19,22 +19,28 @@ class_name PresencodeCommunication
|
|||
|
||||
# CORE
|
||||
var core: Core
|
||||
@onready var logger: CoreLoggerInstance = core.logger.get_instance("src/classes/communication.gd")
|
||||
@onready var sms: CoreBaseModule = core.sms
|
||||
var logger: CoreLoggerInstance
|
||||
var sms: CoreBaseModule
|
||||
|
||||
# Presencode infrastructure
|
||||
var presenloader: Node
|
||||
|
||||
# Presentation data
|
||||
@onready var entrypoint: PresencodeEntrypoint = presenloader.entrypoint_node
|
||||
@onready var manifest: Dictionary = presenloader.manifest
|
||||
var entrypoint: PresencodeEntrypoint
|
||||
var manifest: Dictionary
|
||||
var current_slide: int = -1
|
||||
|
||||
# +++ initialization +++
|
||||
func _init(core_new: Core, presenloader_new: Node) -> void:
|
||||
core = core_new
|
||||
logger = core.logger.get_instance("src/classes/communication.gd", self)
|
||||
sms = core.sms
|
||||
|
||||
presenloader = presenloader_new
|
||||
|
||||
entrypoint = presenloader.entrypoint_node
|
||||
manifest = presenloader.manifest
|
||||
|
||||
# +++ slide management +++
|
||||
func switch_slide(new_slide: int) -> PresencodeTypes.PresencodeError:
|
||||
var old_slide: int = current_slide
|
||||
|
|
|
@ -29,7 +29,7 @@ var manifest: Dictionary = {}
|
|||
|
||||
var entrypoint: Script = null
|
||||
var entrypoint_node: PresencodeEntrypoint = null
|
||||
var communication: PresencodeCommunication = PresencodeCommunication.new(core, self)
|
||||
@onready var communication: PresencodeCommunication = PresencodeCommunication.new(core, self)
|
||||
|
||||
var reader: ZIPReader = ZIPReader.new()
|
||||
var diraccess: DirAccess = null
|
||||
|
|
Loading…
Reference in a new issue