Minor fixes.

This commit is contained in:
NathanSweet 2013-05-07 01:13:34 +02:00
parent 67f2b1c306
commit 4051dedd22
3 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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)