mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +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 slotIndex:int = parseInt(key.substring(0, colon));
|
||||||
var name:String = key.substring(colon + 1);
|
var name:String = key.substring(colon + 1);
|
||||||
var slot:Slot = skeleton.slots[slotIndex];
|
var slot:Slot = skeleton.slots[slotIndex];
|
||||||
if (slot.attachment.name == name) {
|
if (slot.attachment && slot.attachment.name == name) {
|
||||||
var attachment:Attachment = getAttachment(slotIndex, name);
|
var attachment:Attachment = getAttachment(slotIndex, name);
|
||||||
if (attachment != null)
|
if (attachment != null)
|
||||||
slot.attachment = attachment;
|
slot.attachment = attachment;
|
||||||
|
|||||||
@ -86,7 +86,7 @@ public dynamic class RegionAttachment extends Attachment {
|
|||||||
offset[Y4] = localYCos + localX2Sin;
|
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 x:Number = bone.worldX;
|
||||||
var y:Number = bone.worldY;
|
var y:Number = bone.worldY;
|
||||||
var m00:Number = bone.m00;
|
var m00:Number = bone.m00;
|
||||||
|
|||||||
@ -41,7 +41,7 @@ public class SkeletonSprite extends DisplayObject implements IAnimatable {
|
|||||||
var regionAttachment:RegionAttachment = slot.attachment as RegionAttachment;
|
var regionAttachment:RegionAttachment = slot.attachment as RegionAttachment;
|
||||||
if (regionAttachment != null) {
|
if (regionAttachment != null) {
|
||||||
var vertices:Vector.<Number> = this.vertices;
|
var vertices:Vector.<Number> = this.vertices;
|
||||||
regionAttachment.updateVertices(slot.bone, vertices);
|
regionAttachment.computeVertices(slot.bone, vertices);
|
||||||
var r:Number = skeleton.r * slot.r;
|
var r:Number = skeleton.r * slot.r;
|
||||||
var g:Number = skeleton.g * slot.g;
|
var g:Number = skeleton.g * slot.g;
|
||||||
var b:Number = skeleton.b * slot.b;
|
var b:Number = skeleton.b * slot.b;
|
||||||
@ -99,7 +99,7 @@ public class SkeletonSprite extends DisplayObject implements IAnimatable {
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
var vertices:Vector.<Number> = this.vertices;
|
var vertices:Vector.<Number> = this.vertices;
|
||||||
regionAttachment.updateVertices(slot.bone, vertices);
|
regionAttachment.computeVertices(slot.bone, vertices);
|
||||||
|
|
||||||
value = vertices[0];
|
value = vertices[0];
|
||||||
if (value < minX)
|
if (value < minX)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user