Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
bofeng-song committed Dec 11, 2024
1 parent b55263a commit 7ec5247
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cocos/spine/skeleton-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export class SkeletonData extends Asset {
this._skeletonCache = spData;
} else {
const size = this.textures.length;
const textureUUIDs = [] as string[];
const textureUUIDs: string[] = [];
for (let i = 0; i < size; ++i) {
textureUUIDs.push(this.textures[i].uuid);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,11 +503,11 @@ void SpineSkeletonInstance::resizeSlotRegion(const spine::String &slotName, uint
}
}

void SpineSkeletonInstance::setSlotTexture(const spine::String &slotName, const spine::String& textureID) {
void SpineSkeletonInstance::setSlotTexture(const spine::String &slotName, const spine::String& textureUuid) {
if (!_skeleton) return;
auto* slot = _skeleton->findSlot(slotName);
if (!slot) return;
_userData.useSlotTexture = true;

_slotTextureSet.put(slot, textureID);
_slotTextureSet.put(slot, textureUuid);
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class SpineSkeletonInstance {
void onTrackEntryEvent(spine::TrackEntry *entry, spine::EventType type, spine::Event *event);
inline spine::Vector<SpineDebugShape> &getDebugShapes() { return _debugShapes; }
void resizeSlotRegion(const spine::String &slotName, uint32_t width, uint32_t height, bool createNew = false);
void setSlotTexture(const spine::String &slotName, const spine::String& textureID);
void setSlotTexture(const spine::String &slotName, const spine::String& textureUuid);
void destroy();
bool isCache{false};
bool enable{true};
Expand Down

0 comments on commit 7ec5247

Please sign in to comment.