mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[cocos2dx] Fix ClippingAttachment doesn't work (#2011)
This commit is contained in:
parent
3ad80d076f
commit
1aa112fe40
@ -915,14 +915,18 @@ namespace {
|
||||
Attachment *attachment = slot.getAttachment();
|
||||
if (!attachment ||
|
||||
slotIsOutRange(slot, startSlotIndex, endSlotIndex) ||
|
||||
!slot.getBone().isActive() ||
|
||||
slot.getColor().a == 0)
|
||||
!slot.getBone().isActive())
|
||||
return true;
|
||||
if (attachment->getRTTI().isExactly(RegionAttachment::rtti)) {
|
||||
const auto& attachmentRTTI = attachment->getRTTI();
|
||||
if (attachmentRTTI.isExactly(ClippingAttachment::rtti))
|
||||
return false;
|
||||
if (slot.getColor().a == 0)
|
||||
return true;
|
||||
if (attachmentRTTI.isExactly(RegionAttachment::rtti)) {
|
||||
if (static_cast<RegionAttachment*>(attachment)->getColor().a == 0)
|
||||
return true;
|
||||
}
|
||||
else if (attachment->getRTTI().isExactly(MeshAttachment::rtti)) {
|
||||
else if (attachmentRTTI.isExactly(MeshAttachment::rtti)) {
|
||||
if (static_cast<MeshAttachment*>(attachment)->getColor().a == 0)
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user