extend PCK support
This commit is contained in:
25
Game.gd
25
Game.gd
@@ -1,5 +1,5 @@
|
||||
extends Node3D
|
||||
|
||||
class_name Game
|
||||
|
||||
@onready var label : Label = $CanvasLayer/Label
|
||||
@onready var player : CharacterBody3D = $PlayerQ3
|
||||
@@ -7,17 +7,22 @@ extends Node3D
|
||||
|
||||
func _ready():
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||
#var packer = PCKPacker.new()
|
||||
#packer.pck_start("test_map.pck")
|
||||
#packer.add_file("res://test_map.scn", "res://scoom/maps/test_maps.scn")
|
||||
#packer.flush(true)
|
||||
|
||||
Runtimeloader.loadPCK("maps/test_map.pck", self)
|
||||
var config = Runtimeloader.loadConfig("init.cfg") as ConfigFile
|
||||
|
||||
var res = load("res://test_maps.scn") as PackedScene
|
||||
var node = res.instantiate()
|
||||
add_child(node)
|
||||
Runtimeloader.get_all_entities(node)
|
||||
print("Loading PCK...")
|
||||
for map_list in config.get_section_keys("MAPS"):
|
||||
for map in config.get_value("MAPS", map_list):
|
||||
Runtimeloader.loadPCK(map)
|
||||
|
||||
for weapons_list in config.get_section_keys("WEAPONS"):
|
||||
for weapon in config.get_value("WEAPONS", weapons_list):
|
||||
Runtimeloader.loadPCK(weapon)
|
||||
|
||||
print("Loading Resources Done.")
|
||||
|
||||
Runtimeloader.loadScene("maps/test_map.tscn", self)
|
||||
#Runtimeloader.get_all_entities(node)
|
||||
|
||||
|
||||
func _process(_delta):
|
||||
|
||||
Reference in New Issue
Block a user