Skip to content

Commit

Permalink
Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanSweet committed May 6, 2013
1 parent 67f2b1c commit 4051ded
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spine-as3/spine-as3/src/spine/Skin.as
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4051ded

Please sign in to comment.