mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
Minor fixes.
This commit is contained in:
parent
67f2b1c306
commit
4051dedd22
@ -38,7 +38,7 @@ public class Skin {
|
||||
var slotIndex:int = parseInt(key.substring(0, colon));
|
||||
var name:String = key.substring(colon + 1);
|
||||
var slot:Slot = skeleton.slots[slotIndex];
|
||||
if (slot.attachment.name == name) {
|
||||
if (slot.attachment && slot.attachment.name == name) {
|
||||
var attachment:Attachment = getAttachment(slotIndex, name);
|
||||
if (attachment != null)
|
||||
slot.attachment = attachment;
|
||||
|
||||
@ -86,7 +86,7 @@ public dynamic class RegionAttachment extends Attachment {
|
||||
offset[Y4] = localYCos + localX2Sin;
|
||||
}
|
||||
|
||||
public function updateVertices (bone:Bone, vertices:Vector.<Number>) : void {
|
||||
public function computeVertices (bone:Bone, vertices:Vector.<Number>) : void {
|
||||
var x:Number = bone.worldX;
|
||||
var y:Number = bone.worldY;
|
||||
var m00:Number = bone.m00;
|
||||
|
||||
@ -41,7 +41,7 @@ public class SkeletonSprite extends DisplayObject implements IAnimatable {
|
||||
var regionAttachment:RegionAttachment = slot.attachment as RegionAttachment;
|
||||
if (regionAttachment != null) {
|
||||
var vertices:Vector.<Number> = this.vertices;
|
||||
regionAttachment.updateVertices(slot.bone, vertices);
|
||||
regionAttachment.computeVertices(slot.bone, vertices);
|
||||
var r:Number = skeleton.r * slot.r;
|
||||
var g:Number = skeleton.g * slot.g;
|
||||
var b:Number = skeleton.b * slot.b;
|
||||
@ -99,7 +99,7 @@ public class SkeletonSprite extends DisplayObject implements IAnimatable {
|
||||
continue;
|
||||
|
||||
var vertices:Vector.<Number> = this.vertices;
|
||||
regionAttachment.updateVertices(slot.bone, vertices);
|
||||
regionAttachment.computeVertices(slot.bone, vertices);
|
||||
|
||||
value = vertices[0];
|
||||
if (value < minX)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user