fixed camera and sword animation issue and upgraded to Godot 4.6
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
class_name GdUnitThreadContext
|
||||
extends RefCounted
|
||||
|
||||
var _thread :Thread
|
||||
var _thread_name :String
|
||||
var _thread_id :int
|
||||
var _signal_collector :GdUnitSignalCollector
|
||||
var _execution_context :GdUnitExecutionContext
|
||||
var _thread: Thread
|
||||
var _thread_name: String
|
||||
var _thread_id: int
|
||||
var _signal_collector: GdUnitSignalCollector
|
||||
var _execution_context: GdUnitExecutionContext
|
||||
var _asserts := []
|
||||
|
||||
|
||||
func _init(thread :Thread = null) -> void:
|
||||
func _init(thread: Thread = null) -> void:
|
||||
if thread != null:
|
||||
_thread = thread
|
||||
_thread_name = thread.get_meta("name")
|
||||
@@ -29,11 +29,15 @@ func dispose() -> void:
|
||||
_thread = null
|
||||
|
||||
|
||||
func terminate() -> void:
|
||||
_execution_context.terminate()
|
||||
|
||||
|
||||
func clear_assert() -> void:
|
||||
_asserts.clear()
|
||||
|
||||
|
||||
func set_assert(value :GdUnitAssert) -> void:
|
||||
func set_assert(value: GdUnitAssert) -> void:
|
||||
if value != null:
|
||||
_asserts.append(value)
|
||||
|
||||
@@ -42,7 +46,7 @@ func get_assert() -> GdUnitAssert:
|
||||
return null if _asserts.is_empty() else _asserts[-1]
|
||||
|
||||
|
||||
func set_execution_context(context :GdUnitExecutionContext) -> void:
|
||||
func set_execution_context(context: GdUnitExecutionContext) -> void:
|
||||
_execution_context = context
|
||||
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
uid://bbnovcu4fci0e
|
||||
uid://ds5gw1am0fd25
|
||||
|
||||
@@ -3,7 +3,7 @@ class_name GdUnitThreadManager
|
||||
extends Object
|
||||
|
||||
## { <thread_id> = <GdUnitThreadContext> }
|
||||
var _thread_context_by_id := {}
|
||||
var _thread_context_by_id: Dictionary[int, GdUnitThreadContext] = {}
|
||||
## holds the current thread id
|
||||
var _current_thread_id :int = -1
|
||||
|
||||
@@ -25,6 +25,11 @@ static func run(name :String, cb :Callable) -> Variant:
|
||||
return await instance()._run(name, cb)
|
||||
|
||||
|
||||
static func interrupt() -> void:
|
||||
for thread_context: GdUnitThreadContext in instance()._thread_context_by_id.values():
|
||||
thread_context.terminate()
|
||||
|
||||
|
||||
## Returns the current valid thread context
|
||||
static func get_current_context() -> GdUnitThreadContext:
|
||||
return instance()._get_current_context()
|
||||
|
||||
@@ -1 +1 @@
|
||||
uid://frnnd5anspey
|
||||
uid://cvamq1aqfvift
|
||||
|
||||
Reference in New Issue
Block a user