mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +08:00
Regenerated bindings
This commit is contained in:
parent
c4a9b49ef3
commit
cf0cb56609
@ -5,6 +5,5 @@
|
|||||||
import FlutterMacOS
|
import FlutterMacOS
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -246,7 +246,7 @@ func runSkeletonDrawableTestSwift() {
|
|||||||
if let constraint = constraints[i] {
|
if let constraint = constraints[i] {
|
||||||
let rttiClassName = constraint.rtti.rttiClassName ?? "unknown"
|
let rttiClassName = constraint.rtti.rttiClassName ?? "unknown"
|
||||||
print(" Constraint \(i) type: \(rttiClassName)")
|
print(" Constraint \(i) type: \(rttiClassName)")
|
||||||
|
|
||||||
let data = constraint.data
|
let data = constraint.data
|
||||||
let dataRttiClassName = data.rtti.rttiClassName ?? "unknown"
|
let dataRttiClassName = data.rtti.rttiClassName ?? "unknown"
|
||||||
print(" Data type: \(dataRttiClassName)")
|
print(" Data type: \(dataRttiClassName)")
|
||||||
@ -258,44 +258,44 @@ func runSkeletonDrawableTestSwift() {
|
|||||||
print("\nTesting PosedActive methods on Bone:")
|
print("\nTesting PosedActive methods on Bone:")
|
||||||
if let bone = drawable.skeleton.findBone("rear-shin") {
|
if let bone = drawable.skeleton.findBone("rear-shin") {
|
||||||
print(" Found bone: \(bone.data.name)")
|
print(" Found bone: \(bone.data.name)")
|
||||||
|
|
||||||
// Cast Bone to PosedActive and try to call PosedActive methods
|
// Cast Bone to PosedActive and try to call PosedActive methods
|
||||||
let posedActive = bone as PosedActive
|
let posedActive = bone as PosedActive
|
||||||
print(" Successfully cast Bone to PosedActive")
|
print(" Successfully cast Bone to PosedActive")
|
||||||
|
|
||||||
// Try to access PosedActive properties/methods
|
// Try to access PosedActive properties/methods
|
||||||
// This should work if the pointer is correct, or crash if there's an offset issue
|
// This should work if the pointer is correct, or crash if there's an offset issue
|
||||||
|
|
||||||
// Get the isActive property (this is a PosedActive method)
|
// Get the isActive property (this is a PosedActive method)
|
||||||
let isActiveFromPosed = posedActive.isActive
|
let isActiveFromPosed = posedActive.isActive
|
||||||
print(" isActive from PosedActive: \(isActiveFromPosed)")
|
print(" isActive from PosedActive: \(isActiveFromPosed)")
|
||||||
|
|
||||||
// Set active property through PosedActive
|
// Set active property through PosedActive
|
||||||
print(" Setting active to false through PosedActive...")
|
print(" Setting active to false through PosedActive...")
|
||||||
posedActive.active = false
|
posedActive.active = false
|
||||||
print(" ✓ Set active property succeeded")
|
print(" ✓ Set active property succeeded")
|
||||||
|
|
||||||
// Check if it's actually false
|
// Check if it's actually false
|
||||||
let isStillActive = posedActive.isActive
|
let isStillActive = posedActive.isActive
|
||||||
print(" isActive after setting to false: \(isStillActive)")
|
print(" isActive after setting to false: \(isStillActive)")
|
||||||
|
|
||||||
// Restore it
|
// Restore it
|
||||||
posedActive.active = true
|
posedActive.active = true
|
||||||
print(" Restored active to true")
|
print(" Restored active to true")
|
||||||
|
|
||||||
// Now test the Update protocol
|
// Now test the Update protocol
|
||||||
let updateProtocol = bone as Update
|
let updateProtocol = bone as Update
|
||||||
print(" Successfully cast Bone to Update protocol")
|
print(" Successfully cast Bone to Update protocol")
|
||||||
|
|
||||||
// Call update with required parameters
|
// Call update with required parameters
|
||||||
print(" Calling update() through Update protocol...")
|
print(" Calling update() through Update protocol...")
|
||||||
updateProtocol.update(drawable.skeleton, Physics.none)
|
updateProtocol.update(drawable.skeleton, Physics.none)
|
||||||
print(" ✓ update() call succeeded through Update protocol")
|
print(" ✓ update() call succeeded through Update protocol")
|
||||||
|
|
||||||
// Test that we can still use Bone methods after casting
|
// Test that we can still use Bone methods after casting
|
||||||
let appliedPose = bone.appliedPose
|
let appliedPose = bone.appliedPose
|
||||||
print(" Bone appliedPose still accessible: x=\(appliedPose.x), y=\(appliedPose.y)")
|
print(" Bone appliedPose still accessible: x=\(appliedPose.x), y=\(appliedPose.y)")
|
||||||
|
|
||||||
// The fact that this all works suggests the pointer is being handled correctly
|
// The fact that this all works suggests the pointer is being handled correctly
|
||||||
// even though we're not using cast functions in the constructor chain
|
// even though we're not using cast functions in the constructor chain
|
||||||
print(" ✓ All PosedActive and Update methods work correctly on Bone instance")
|
print(" ✓ All PosedActive and Update methods work correctly on Bone instance")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user