@@ -591,9 +591,6 @@ declare module spine {
ChainScale = 2,
}
-interface Math {
- fround(n: number): number;
-}
declare module spine {
class SharedAssetManager implements Disposable {
private pathPrefix;
@@ -1002,6 +999,7 @@ declare module spine {
static newShortArray(size: number): ArrayLike<number>;
static toFloatArray(array: Array<number>): number[] | Float32Array;
static toSinglePrecision(value: number): number;
+ static webkit602BugfixHelper(alpha: number, blend: MixBlend): void;
class DebugUtils {
static logBones(skeleton: Skeleton): void;
@@ -1056,6 +1054,9 @@ declare module spine {
end(): void;
+interface Math {
+ fround(n: number): number;
+}
abstract class Attachment {
name: string;
@@ -163,12 +163,12 @@ var spine;
var y = curves[i - 1];
return y + (1 - y) * (percent - x) / (1 - x);
};
+ CurveTimeline.LINEAR = 0;
+ CurveTimeline.STEPPED = 1;
+ CurveTimeline.BEZIER = 2;
+ CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;
return CurveTimeline;
}());
- CurveTimeline.LINEAR = 0;
- CurveTimeline.STEPPED = 1;
- CurveTimeline.BEZIER = 2;
- CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;
spine.CurveTimeline = CurveTimeline;
var RotateTimeline = (function (_super) {
__extends(RotateTimeline, _super);
@@ -231,12 +231,12 @@ var spine;
bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;
+ RotateTimeline.ENTRIES = 2;
+ RotateTimeline.PREV_TIME = -2;
+ RotateTimeline.PREV_ROTATION = -1;
+ RotateTimeline.ROTATION = 1;
return RotateTimeline;
}(CurveTimeline));
- RotateTimeline.ENTRIES = 2;
- RotateTimeline.PREV_TIME = -2;
- RotateTimeline.PREV_ROTATION = -1;
- RotateTimeline.ROTATION = 1;
spine.RotateTimeline = RotateTimeline;
var TranslateTimeline = (function (_super) {
__extends(TranslateTimeline, _super);
@@ -298,14 +298,14 @@ var spine;
bone.y += y * alpha;
+ TranslateTimeline.ENTRIES = 3;
+ TranslateTimeline.PREV_TIME = -3;
+ TranslateTimeline.PREV_X = -2;
+ TranslateTimeline.PREV_Y = -1;
+ TranslateTimeline.X = 1;
+ TranslateTimeline.Y = 2;
return TranslateTimeline;
- TranslateTimeline.ENTRIES = 3;
- TranslateTimeline.PREV_TIME = -3;
- TranslateTimeline.PREV_X = -2;
- TranslateTimeline.PREV_Y = -1;
- TranslateTimeline.X = 1;
- TranslateTimeline.Y = 2;
spine.TranslateTimeline = TranslateTimeline;
var ScaleTimeline = (function (_super) {
__extends(ScaleTimeline, _super);
@@ -522,18 +522,18 @@ var spine;
color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);
+ ColorTimeline.ENTRIES = 5;
+ ColorTimeline.PREV_TIME = -5;
+ ColorTimeline.PREV_R = -4;
+ ColorTimeline.PREV_G = -3;
+ ColorTimeline.PREV_B = -2;
+ ColorTimeline.PREV_A = -1;
+ ColorTimeline.R = 1;
+ ColorTimeline.G = 2;
+ ColorTimeline.B = 3;
+ ColorTimeline.A = 4;
return ColorTimeline;
- ColorTimeline.ENTRIES = 5;
- ColorTimeline.PREV_TIME = -5;
- ColorTimeline.PREV_R = -4;
- ColorTimeline.PREV_G = -3;
- ColorTimeline.PREV_B = -2;
- ColorTimeline.PREV_A = -1;
- ColorTimeline.R = 1;
- ColorTimeline.G = 2;
- ColorTimeline.B = 3;
- ColorTimeline.A = 4;
spine.ColorTimeline = ColorTimeline;
var TwoColorTimeline = (function (_super) {
__extends(TwoColorTimeline, _super);
@@ -616,24 +616,24 @@ var spine;
dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);
+ TwoColorTimeline.ENTRIES = 8;
+ TwoColorTimeline.PREV_TIME = -8;
+ TwoColorTimeline.PREV_R = -7;
+ TwoColorTimeline.PREV_G = -6;
+ TwoColorTimeline.PREV_B = -5;
+ TwoColorTimeline.PREV_A = -4;
+ TwoColorTimeline.PREV_R2 = -3;
+ TwoColorTimeline.PREV_G2 = -2;
+ TwoColorTimeline.PREV_B2 = -1;
+ TwoColorTimeline.R = 1;
+ TwoColorTimeline.G = 2;
+ TwoColorTimeline.B = 3;
+ TwoColorTimeline.A = 4;
+ TwoColorTimeline.R2 = 5;
+ TwoColorTimeline.G2 = 6;
+ TwoColorTimeline.B2 = 7;
return TwoColorTimeline;
- TwoColorTimeline.ENTRIES = 8;
- TwoColorTimeline.PREV_TIME = -8;
- TwoColorTimeline.PREV_R = -7;
- TwoColorTimeline.PREV_G = -6;
- TwoColorTimeline.PREV_B = -5;
- TwoColorTimeline.PREV_A = -4;
- TwoColorTimeline.PREV_R2 = -3;
- TwoColorTimeline.PREV_G2 = -2;
- TwoColorTimeline.PREV_B2 = -1;
- TwoColorTimeline.R = 1;
- TwoColorTimeline.G = 2;
- TwoColorTimeline.B = 3;
- TwoColorTimeline.A = 4;
- TwoColorTimeline.R2 = 5;
- TwoColorTimeline.G2 = 6;
- TwoColorTimeline.B2 = 7;
spine.TwoColorTimeline = TwoColorTimeline;
var AttachmentTimeline = (function () {
function AttachmentTimeline(frameCount) {
@@ -1013,14 +1013,14 @@ var spine;
constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];
+ IkConstraintTimeline.ENTRIES = 3;
+ IkConstraintTimeline.PREV_TIME = -3;
+ IkConstraintTimeline.PREV_MIX = -2;
+ IkConstraintTimeline.PREV_BEND_DIRECTION = -1;
+ IkConstraintTimeline.MIX = 1;
+ IkConstraintTimeline.BEND_DIRECTION = 2;
return IkConstraintTimeline;
- IkConstraintTimeline.ENTRIES = 3;
- IkConstraintTimeline.PREV_TIME = -3;
- IkConstraintTimeline.PREV_MIX = -2;
- IkConstraintTimeline.PREV_BEND_DIRECTION = -1;
- IkConstraintTimeline.MIX = 1;
- IkConstraintTimeline.BEND_DIRECTION = 2;
spine.IkConstraintTimeline = IkConstraintTimeline;
var TransformConstraintTimeline = (function (_super) {
__extends(TransformConstraintTimeline, _super);
@@ -1095,18 +1095,18 @@ var spine;
constraint.shearMix += (shear - constraint.shearMix) * alpha;
+ TransformConstraintTimeline.ENTRIES = 5;
+ TransformConstraintTimeline.PREV_TIME = -5;
+ TransformConstraintTimeline.PREV_ROTATE = -4;
+ TransformConstraintTimeline.PREV_TRANSLATE = -3;
+ TransformConstraintTimeline.PREV_SCALE = -2;
+ TransformConstraintTimeline.PREV_SHEAR = -1;
+ TransformConstraintTimeline.ROTATE = 1;
+ TransformConstraintTimeline.TRANSLATE = 2;
+ TransformConstraintTimeline.SCALE = 3;
+ TransformConstraintTimeline.SHEAR = 4;
return TransformConstraintTimeline;
- TransformConstraintTimeline.ENTRIES = 5;
- TransformConstraintTimeline.PREV_TIME = -5;
- TransformConstraintTimeline.PREV_ROTATE = -4;
- TransformConstraintTimeline.PREV_TRANSLATE = -3;
- TransformConstraintTimeline.PREV_SCALE = -2;
- TransformConstraintTimeline.PREV_SHEAR = -1;
- TransformConstraintTimeline.ROTATE = 1;
- TransformConstraintTimeline.TRANSLATE = 2;
- TransformConstraintTimeline.SCALE = 3;
- TransformConstraintTimeline.SHEAR = 4;
spine.TransformConstraintTimeline = TransformConstraintTimeline;
var PathConstraintPositionTimeline = (function (_super) {
__extends(PathConstraintPositionTimeline, _super);
@@ -1151,12 +1151,12 @@ var spine;
else
constraint.position += (position - constraint.position) * alpha;
+ PathConstraintPositionTimeline.ENTRIES = 2;
+ PathConstraintPositionTimeline.PREV_TIME = -2;
+ PathConstraintPositionTimeline.PREV_VALUE = -1;
+ PathConstraintPositionTimeline.VALUE = 1;
return PathConstraintPositionTimeline;
- PathConstraintPositionTimeline.ENTRIES = 2;
- PathConstraintPositionTimeline.PREV_TIME = -2;
- PathConstraintPositionTimeline.PREV_VALUE = -1;
- PathConstraintPositionTimeline.VALUE = 1;
spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;
var PathConstraintSpacingTimeline = (function (_super) {
__extends(PathConstraintSpacingTimeline, _super);
@@ -1251,14 +1251,14 @@ var spine;
constraint.translateMix += (translate - constraint.translateMix) * alpha;
+ PathConstraintMixTimeline.ENTRIES = 3;
+ PathConstraintMixTimeline.PREV_TIME = -3;
+ PathConstraintMixTimeline.PREV_ROTATE = -2;
+ PathConstraintMixTimeline.PREV_TRANSLATE = -1;
+ PathConstraintMixTimeline.ROTATE = 1;
+ PathConstraintMixTimeline.TRANSLATE = 2;
return PathConstraintMixTimeline;
- PathConstraintMixTimeline.ENTRIES = 3;
- PathConstraintMixTimeline.PREV_TIME = -3;
- PathConstraintMixTimeline.PREV_ROTATE = -2;
- PathConstraintMixTimeline.PREV_TRANSLATE = -1;
- PathConstraintMixTimeline.ROTATE = 1;
- PathConstraintMixTimeline.TRANSLATE = 2;
spine.PathConstraintMixTimeline = PathConstraintMixTimeline;
})(spine || (spine = {}));
var spine;
@@ -1383,8 +1383,10 @@ var spine;
if (timeline instanceof spine.RotateTimeline) {
this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);
- else
+ else {
+ spine.Utils.webkit602BugfixHelper(mix, blend);
timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection["in"]);
+ }
this.queueEvents(current, animationTime);
@@ -1461,6 +1463,7 @@ var spine;
if (timeline instanceof spine.RotateTimeline)
this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);
else {
+ spine.Utils.webkit602BugfixHelper(alpha, blend);
timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, spine.MixDirection.out);
@@ -1760,13 +1763,13 @@ var spine;
AnimationState.prototype.clearListenerNotifications = function () {
this.queue.clear();
+ AnimationState.emptyAnimation = new spine.Animation("<empty>", [], 0);
+ AnimationState.SUBSEQUENT = 0;
+ AnimationState.FIRST = 1;
+ AnimationState.DIP = 2;
+ AnimationState.DIP_MIX = 3;
return AnimationState;
- AnimationState.emptyAnimation = new spine.Animation("<empty>", [], 0);
- AnimationState.SUBSEQUENT = 0;
- AnimationState.FIRST = 1;
- AnimationState.DIP = 2;
- AnimationState.DIP_MIX = 3;
spine.AnimationState = AnimationState;
var TrackEntry = (function () {
function TrackEntry() {
@@ -3188,12 +3191,12 @@ var spine;
PathConstraint.prototype.getOrder = function () {
return this.data.order;
+ PathConstraint.NONE = -1;
+ PathConstraint.BEFORE = -2;
+ PathConstraint.AFTER = -3;
+ PathConstraint.epsilon = 0.00001;
return PathConstraint;
- PathConstraint.NONE = -1;
- PathConstraint.BEFORE = -2;
- PathConstraint.AFTER = -3;
- PathConstraint.epsilon = 0.00001;
spine.PathConstraint = PathConstraint;
@@ -3225,15 +3228,6 @@ var spine;
RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale";
})(RotateMode = spine.RotateMode || (spine.RotateMode = {}));
-(function () {
- if (!Math.fround) {
- Math.fround = (function (array) {
- return function (x) {
- return array[0] = x, array[0];
- };
- })(new Float32Array(1));
- }
-})();
(function (spine) {
var Assets = (function () {
@@ -6004,13 +5998,13 @@ var spine;
this.a = 1;
return this;
+ Color.WHITE = new Color(1, 1, 1, 1);
+ Color.RED = new Color(1, 0, 0, 1);
+ Color.GREEN = new Color(0, 1, 0, 1);
+ Color.BLUE = new Color(0, 0, 1, 1);
+ Color.MAGENTA = new Color(1, 0, 1, 1);
return Color;
- Color.WHITE = new Color(1, 1, 1, 1);
- Color.RED = new Color(1, 0, 0, 1);
- Color.GREEN = new Color(0, 1, 0, 1);
- Color.BLUE = new Color(0, 0, 1, 1);
- Color.MAGENTA = new Color(1, 0, 1, 1);
spine.Color = Color;
var MathUtils = (function () {
function MathUtils() {
@@ -6048,14 +6042,14 @@ var spine;
return min + Math.sqrt(u * d * (mode - min));
return max - Math.sqrt((1 - u) * d * (max - mode));
+ MathUtils.PI = 3.1415927;
+ MathUtils.PI2 = MathUtils.PI * 2;
+ MathUtils.radiansToDegrees = 180 / MathUtils.PI;
+ MathUtils.radDeg = MathUtils.radiansToDegrees;
+ MathUtils.degreesToRadians = MathUtils.PI / 180;
+ MathUtils.degRad = MathUtils.degreesToRadians;
return MathUtils;
- MathUtils.PI = 3.1415927;
- MathUtils.PI2 = MathUtils.PI * 2;
- MathUtils.radiansToDegrees = 180 / MathUtils.PI;
- MathUtils.radDeg = MathUtils.radiansToDegrees;
- MathUtils.degreesToRadians = MathUtils.PI / 180;
- MathUtils.degRad = MathUtils.degreesToRadians;
spine.MathUtils = MathUtils;
var Interpolation = (function () {
function Interpolation() {
@@ -6153,9 +6147,11 @@ var spine;
Utils.toSinglePrecision = function (value) {
return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;
+ Utils.webkit602BugfixHelper = function (alpha, blend) {
+ };
+ Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined";
return Utils;
- Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined";
spine.Utils = Utils;
var DebugUtils = (function () {
function DebugUtils() {
@@ -6291,6 +6287,15 @@ var spine;
spine.WindowedMean = WindowedMean;
+(function () {
+ if (!Math.fround) {
+ Math.fround = (function (array) {
+ return function (x) {
+ return array[0] = x, array[0];
+ })(new Float32Array(1));
+})();
var Attachment = (function () {
@@ -6372,9 +6377,9 @@ var spine;
VertexAttachment.prototype.applyDeform = function (sourceAttachment) {
return this == sourceAttachment;
+ VertexAttachment.nextID = 0;
return VertexAttachment;
}(Attachment));
- VertexAttachment.nextID = 0;
spine.VertexAttachment = VertexAttachment;
@@ -6612,48 +6617,48 @@ var spine;
worldVertices[offset] = offsetX * a + offsetY * b + x;
worldVertices[offset + 1] = offsetX * c + offsetY * d + y;
+ RegionAttachment.OX1 = 0;
+ RegionAttachment.OY1 = 1;
+ RegionAttachment.OX2 = 2;
+ RegionAttachment.OY2 = 3;
+ RegionAttachment.OX3 = 4;
+ RegionAttachment.OY3 = 5;
+ RegionAttachment.OX4 = 6;
+ RegionAttachment.OY4 = 7;
+ RegionAttachment.X1 = 0;
+ RegionAttachment.Y1 = 1;
+ RegionAttachment.C1R = 2;
+ RegionAttachment.C1G = 3;
+ RegionAttachment.C1B = 4;
+ RegionAttachment.C1A = 5;
+ RegionAttachment.U1 = 6;
+ RegionAttachment.V1 = 7;
+ RegionAttachment.X2 = 8;
+ RegionAttachment.Y2 = 9;
+ RegionAttachment.C2R = 10;
+ RegionAttachment.C2G = 11;
+ RegionAttachment.C2B = 12;
+ RegionAttachment.C2A = 13;
+ RegionAttachment.U2 = 14;
+ RegionAttachment.V2 = 15;
+ RegionAttachment.X3 = 16;
+ RegionAttachment.Y3 = 17;
+ RegionAttachment.C3R = 18;
+ RegionAttachment.C3G = 19;
+ RegionAttachment.C3B = 20;
+ RegionAttachment.C3A = 21;
+ RegionAttachment.U3 = 22;
+ RegionAttachment.V3 = 23;
+ RegionAttachment.X4 = 24;
+ RegionAttachment.Y4 = 25;
+ RegionAttachment.C4R = 26;
+ RegionAttachment.C4G = 27;
+ RegionAttachment.C4B = 28;
+ RegionAttachment.C4A = 29;
+ RegionAttachment.U4 = 30;
+ RegionAttachment.V4 = 31;
return RegionAttachment;
}(spine.Attachment));
- RegionAttachment.OX1 = 0;
- RegionAttachment.OY1 = 1;
- RegionAttachment.OX2 = 2;
- RegionAttachment.OY2 = 3;
- RegionAttachment.OX3 = 4;
- RegionAttachment.OY3 = 5;
- RegionAttachment.OX4 = 6;
- RegionAttachment.OY4 = 7;
- RegionAttachment.X1 = 0;
- RegionAttachment.Y1 = 1;
- RegionAttachment.C1R = 2;
- RegionAttachment.C1G = 3;
- RegionAttachment.C1B = 4;
- RegionAttachment.C1A = 5;
- RegionAttachment.U1 = 6;
- RegionAttachment.V1 = 7;
- RegionAttachment.X2 = 8;
- RegionAttachment.Y2 = 9;
- RegionAttachment.C2R = 10;
- RegionAttachment.C2G = 11;
- RegionAttachment.C2B = 12;
- RegionAttachment.C2A = 13;
- RegionAttachment.U2 = 14;
- RegionAttachment.V2 = 15;
- RegionAttachment.X3 = 16;
- RegionAttachment.Y3 = 17;
- RegionAttachment.C3R = 18;
- RegionAttachment.C3G = 19;
- RegionAttachment.C3B = 20;
- RegionAttachment.C3A = 21;
- RegionAttachment.U3 = 22;
- RegionAttachment.V3 = 23;
- RegionAttachment.X4 = 24;
- RegionAttachment.Y4 = 25;
- RegionAttachment.C4R = 26;
- RegionAttachment.C4G = 27;
- RegionAttachment.C4B = 28;
- RegionAttachment.C4A = 29;
- RegionAttachment.U4 = 30;
- RegionAttachment.V4 = 31;
spine.RegionAttachment = RegionAttachment;
@@ -6708,9 +6713,9 @@ var spine;
SwirlEffect.prototype.end = function () {
+ SwirlEffect.interpolation = new spine.PowOut(2);
return SwirlEffect;
- SwirlEffect.interpolation = new spine.PowOut(2);
spine.SwirlEffect = SwirlEffect;
@@ -6961,10 +6966,10 @@ var spine;
return vertices;
+ SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];
+ SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;
return SkeletonRenderer;
- SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];
- SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;
canvas.SkeletonRenderer = SkeletonRenderer;
})(canvas = spine.canvas || (spine.canvas = {}));
//# sourceMappingURL=spine-core.js.map
@@ -6810,9 +6815,9 @@ var spine;
geo.drawRange.start = 0;
geo.drawRange.count = this.indicesLength;
+ MeshBatcher.VERTEX_SIZE = 9;
return MeshBatcher;
}(THREE.Mesh));
- MeshBatcher.VERTEX_SIZE = 9;
threejs.MeshBatcher = MeshBatcher;
})(threejs = spine.threejs || (spine.threejs = {}));
@@ -7048,10 +7053,10 @@ var spine;
clipper.clipEnd();
batch.end();
+ SkeletonMesh.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];
+ SkeletonMesh.VERTEX_SIZE = 2 + 2 + 4;
return SkeletonMesh;
}(THREE.Object3D));
- SkeletonMesh.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];
- SkeletonMesh.VERTEX_SIZE = 2 + 2 + 4;
threejs.SkeletonMesh = SkeletonMesh;
@@ -172,8 +172,11 @@ module spine {
let timelineBlend = timelineData[ii] == AnimationState.SUBSEQUENT ? blend : MixBlend.setup;
if (timeline instanceof RotateTimeline) {
- } else
+ } else {
+ // This fixes the WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109
+ Utils.webkit602BugfixHelper(mix, blend);
timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, MixDirection.in);
@@ -247,6 +250,8 @@ module spine {
if (timeline instanceof RotateTimeline)
+ Utils.webkit602BugfixHelper(alpha, blend);
timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, MixDirection.out);
@@ -259,6 +259,11 @@ module spine {
static toSinglePrecision (value: number) {
+
+ // This function is used to fix WebKit 602 specific issue described at http://esotericsoftware.com/forum/iOS-10-disappearing-graphics-10109
+ static webkit602BugfixHelper (alpha: number, blend: MixBlend) {
export class DebugUtils {
@@ -0,0 +1,96 @@
+/******************************************************************************
+* Spine Runtimes Software License v2.5
+*
+* Copyright (c) 2013-2016, Esoteric Software
+* All rights reserved.
+* You are granted a perpetual, non-exclusive, non-sublicensable, and
+* non-transferable license to use, install, execute, and perform the Spine
+* Runtimes software and derivative works solely for personal or internal
+* use. Without the written permission of Esoteric Software (see Section 2 of
+* the Spine Software License Agreement), you may not (a) modify, translate,
+* adapt, or develop new applications using the Spine Runtimes or otherwise
+* create derivative works or improvements of the Spine Runtimes or (b) remove,
+* delete, alter, or obscure any trademarks or any copyright, trademark, patent,
+* or other intellectual property or proprietary rights notices on or in the
+* Software, including any copy thereof. Redistributions in binary or source
+* form must include this license and terms.
+* THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR
+* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+* EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF
+* USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************/
+#include "SpinePluginPrivatePCH.h"
+#include "SSpineWidget.h"
+#include "Framework/Application/SlateApplication.h"
+#include "Materials/MaterialInterface.h"
+#include "Materials/MaterialInstanceDynamic.h"
+#include "Modules/ModuleManager.h"
+#include "Runtime/SlateRHIRenderer/Public/Interfaces/ISlateRHIRendererModule.h"
+#include "Rendering/DrawElements.h"
+#include "Slate/SlateVectorArtData.h"
+#include "Slate/SlateVectorArtInstanceData.h"
+#include "Slate/SMeshWidget.h"
+#include "SlateMaterialBrush.h"
+void SSpineWidget::Construct(const FArguments& args) {
+void SSpineWidget::SetBrush(FSlateBrush* Brush) {
+ brush = Brush;
+static void setVertex(FSlateVertex* vertex, float x, float y, float u, float v, const FColor& color, const FVector2D& offset) {
+ vertex->Position.X = offset.X + x;
+ vertex->Position.Y = offset.Y + y;
+ vertex->TexCoords[0] = u;
+ vertex->TexCoords[1] = v;
+ vertex->TexCoords[2] = u;
+ vertex->TexCoords[3] = v;
+ vertex->MaterialTexCoords.X = u;
+ vertex->MaterialTexCoords.Y = v;
+ vertex->Color = color;
+ vertex->PixelSize[0] = 1;
+ vertex->PixelSize[1] = 1;
+int32 SSpineWidget::OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyClippingRect, FSlateWindowElementList& OutDrawElements,
+ int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled) const {
+ SSpineWidget* self = (SSpineWidget*)this;
+ self->renderData.IndexData.SetNumUninitialized(6);
+ uint32* indexData = (uint32*)renderData.IndexData.GetData();
+ indexData[0] = 0;
+ indexData[1] = 1;
+ indexData[2] = 2;
+ indexData[3] = 2;
+ indexData[4] = 3;
+ indexData[5] = 0;
+ self->renderData.VertexData.SetNumUninitialized(4);
+ FSlateVertex* vertexData = (FSlateVertex*)renderData.VertexData.GetData();
+ FVector2D offset = AllottedGeometry.AbsolutePosition;
+ FColor white = FColor(0xffffffff);
+ setVertex(&vertexData[0], 0, 0, 0, 0, white, offset);
+ setVertex(&vertexData[1], 200, 0, 1, 0, white, offset);
+ setVertex(&vertexData[2], 200, 200, 1, 1, white, offset);
+ setVertex(&vertexData[3], 0, 200, 0, 1, white, offset);
+ if (brush && renderData.VertexData.Num() > 0 && renderData.IndexData.Num() > 0) {
+ FSlateShaderResourceProxy* shaderResource = FSlateDataPayload::ResourceManager->GetShaderResource(*brush);
+ FSlateResourceHandle resourceHandle = FSlateApplication::Get().GetRenderer()->GetResourceHandle(*brush);
+ if (shaderResource)
+ FSlateDrawElement::MakeCustomVerts(OutDrawElements, LayerId, resourceHandle, renderData.VertexData,
+ renderData.IndexData, nullptr, 0, 0);
+ return LayerId;
@@ -36,3 +36,4 @@
#include "SpineSkeletonRendererComponent.h"
#include "SpineBoneFollowerComponent.h"
#include "SpineBoneDriverComponent.h"
+#include "SpineWidget.h"
@@ -0,0 +1,62 @@
+#define LOCTEXT_NAMESPACE "Spine"
+USpineWidget::USpineWidget(const FObjectInitializer& ObjectInitializer): Super(ObjectInitializer) {
+void USpineWidget::SynchronizeProperties() {
+ Super::SynchronizeProperties();
+ if (slateWidget.IsValid()) {
+ slateWidget->SetBrush(&Brush);
+void USpineWidget::ReleaseSlateResources(bool bReleaseChildren) {
+ Super::ReleaseSlateResources(bReleaseChildren);
+ slateWidget.Reset();
+TSharedRef<SWidget> USpineWidget::RebuildWidget() {
+ this->slateWidget = SNew(SSpineWidget);
+ return this->slateWidget.ToSharedRef();
+#if WITH_EDITOR
+const FText USpineWidget::GetPaletteCategory() {
+ return LOCTEXT("Spine", "Spine");
+#endif
@@ -0,0 +1,52 @@
+#pragma once
+#include "SlateCore.h"
+class SSpineWidget: public SMeshWidget {
+public:
+ SLATE_BEGIN_ARGS(SSpineWidget): _MeshData(nullptr) { }
+ SLATE_ARGUMENT(USlateVectorArtData*, MeshData)
+ SLATE_END_ARGS()
+ void Construct(const FArguments& Args);
+ void SetBrush(FSlateBrush* Brush);
+protected:
+ virtual int32 OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled) const override;
+ FSlateBrush* brush = nullptr;
+ FRenderData renderData;
+};
@@ -0,0 +1,60 @@
+#include "Runtime/UMG/Public/UMG.h"
+#include "Runtime/UMG/Public/UMGStyle.h"
+#include "SpineWidget.generated.h"
+class SSpineWidget;
+UCLASS(ClassGroup = (Spine), meta = (BlueprintSpawnableComponent))
+class SPINEPLUGIN_API USpineWidget: public UWidget {
+ GENERATED_UCLASS_BODY()
+ virtual void ReleaseSlateResources(bool bReleaseChildren) override;
+ virtual void SynchronizeProperties() override;
+ virtual const FText GetPaletteCategory() override;
+ UPROPERTY(Category = Spine, EditAnywhere, BlueprintReadOnly)
+ FSlateBrush Brush;
+ virtual TSharedRef<SWidget> RebuildWidget() override;
+ TSharedPtr<SSpineWidget> slateWidget;
@@ -8,7 +8,7 @@ namespace UnrealBuildTool.Rules
{
PublicIncludePaths.AddRange(new string[] { "SpinePlugin/Public", "SpinePlugin/Public/spine-c/include" });
PrivateIncludePaths.AddRange(new string[] { "SpinePlugin/Private", "SpinePlugin/Public/spine-c/include" });
- PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "RHI", "RenderCore", "ShaderCore", "ProceduralMeshComponent", "RuntimeMeshComponent" });
+ PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "RHI", "RenderCore", "ShaderCore", "RuntimeMeshComponent", "UMG", "Slate", "SlateCore" });
OptimizeCode = CodeOptimization.Never;
@@ -0,0 +1,1926 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!29 &1
+OcclusionCullingSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_OcclusionBakeSettings:
+ smallestOccluder: 5
+ smallestHole: 0.25
+ backfaceThreshold: 100
+ m_SceneGUID: 00000000000000000000000000000000
+ m_OcclusionCullingData: {fileID: 0}
+--- !u!104 &2
+RenderSettings:
+ serializedVersion: 8
+ m_Fog: 0
+ m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
+ m_FogMode: 3
+ m_FogDensity: 0.01
+ m_LinearFogStart: 0
+ m_LinearFogEnd: 300
+ m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
+ m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
+ m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
+ m_AmbientIntensity: 1
+ m_AmbientMode: 3
+ m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
+ m_SkyboxMaterial: {fileID: 0}
+ m_HaloStrength: 0.5
+ m_FlareStrength: 1
+ m_FlareFadeSpeed: 3
+ m_HaloTexture: {fileID: 0}
+ m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
+ m_DefaultReflectionMode: 0
+ m_DefaultReflectionResolution: 128
+ m_ReflectionBounces: 1
+ m_ReflectionIntensity: 1
+ m_CustomReflection: {fileID: 0}
+ m_Sun: {fileID: 0}
+ m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
+--- !u!157 &3
+LightmapSettings:
+ serializedVersion: 9
+ m_GIWorkflowMode: 1
+ m_GISettings:
+ m_BounceScale: 1
+ m_IndirectOutputScale: 1
+ m_AlbedoBoost: 1
+ m_TemporalCoherenceThreshold: 1
+ m_EnvironmentLightingMode: 0
+ m_EnableBakedLightmaps: 0
+ m_EnableRealtimeLightmaps: 0
+ m_LightmapEditorSettings:
+ m_Resolution: 2
+ m_BakeResolution: 40
+ m_TextureWidth: 1024
+ m_TextureHeight: 1024
+ m_AO: 0
+ m_AOMaxDistance: 1
+ m_CompAOExponent: 1
+ m_CompAOExponentDirect: 0
+ m_Padding: 2
+ m_LightmapParameters: {fileID: 0}
+ m_LightmapsBakeMode: 1
+ m_TextureCompression: 1
+ m_FinalGather: 0
+ m_FinalGatherFiltering: 1
+ m_FinalGatherRayCount: 256
+ m_ReflectionCompression: 2
+ m_MixedBakeMode: 3
+ m_BakeBackend: 0
+ m_PVRSampling: 1
+ m_PVRDirectSampleCount: 32
+ m_PVRSampleCount: 500
+ m_PVRBounces: 2
+ m_PVRFiltering: 0
+ m_PVRFilteringMode: 1
+ m_PVRCulling: 1
+ m_PVRFilteringGaussRadiusDirect: 1
+ m_PVRFilteringGaussRadiusIndirect: 5
+ m_PVRFilteringGaussRadiusAO: 2
+ m_PVRFilteringAtrousColorSigma: 1
+ m_PVRFilteringAtrousNormalSigma: 1
+ m_PVRFilteringAtrousPositionSigma: 1
+ m_LightingDataAsset: {fileID: 0}
+ m_ShadowMaskMode: 2
+--- !u!196 &4
+NavMeshSettings:
+ m_BuildSettings:
+ agentTypeID: 0
+ agentRadius: 0.5
+ agentHeight: 2
+ agentSlope: 45
+ agentClimb: 0.4
+ ledgeDropHeight: 0
+ maxJumpAcrossDistance: 0
+ minRegionArea: 2
+ manualCellSize: 0
+ cellSize: 0.16666667
+ manualTileSize: 0
+ tileSize: 256
+ accuratePlacement: 0
+ m_NavMeshData: {fileID: 0}
+--- !u!1 &21238537
+GameObject:
+ m_PrefabParentObject: {fileID: 0}
+ m_PrefabInternal: {fileID: 0}
+ serializedVersion: 5
+ m_Component:
+ - component: {fileID: 21238538}
+ - component: {fileID: 21238542}
+ - component: {fileID: 21238541}
+ - component: {fileID: 21238539}
+ - component: {fileID: 21238540}
+ m_Layer: 0
+ m_Name: front-upper-arm
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &21238538
+Transform:
+ m_GameObject: {fileID: 21238537}
+ m_LocalRotation: {x: 0, y: 0, z: 0.75350606, w: 0.65744096}
+ m_LocalPosition: {x: 0.1872, y: 0.1933, z: 0}
+ m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1}
+ m_Children:
+ - {fileID: 103730715}
+ m_Father: {fileID: 1828877180}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!54 &21238539
+Rigidbody:
+ m_Mass: 0.75
+ m_Drag: 0
+ m_AngularDrag: 0.05
+ m_UseGravity: 1
+ m_IsKinematic: 0
+ m_Interpolate: 0
+ m_Constraints: 0
+ m_CollisionDetection: 0
+--- !u!59 &21238540
+HingeJoint:
+ m_ConnectedBody: {fileID: 1828877181}
+ m_Anchor: {x: 0, y: 0, z: 0}
+ m_Axis: {x: 0, y: 0, z: 1}
+ m_AutoConfigureConnectedAnchor: 1
+ m_ConnectedAnchor: {x: 0.18719997, y: 0.19329992, z: 0}
+ m_UseSpring: 0
+ m_Spring:
+ spring: 0
+ damper: 0
+ targetPosition: 0
+ m_UseMotor: 0
+ m_Motor:
+ targetVelocity: 0
+ force: 0
+ freeSpin: 0
+ m_UseLimits: 1
+ m_Limits:
+ min: -60
+ max: 150
+ bounciness: 0
+ bounceMinVelocity: 0
+ contactDistance: 0
+ m_BreakForce: Infinity
+ m_BreakTorque: Infinity
+ m_EnableCollision: 0
+ m_EnablePreprocessing: 1
+--- !u!65 &21238541
+BoxCollider:
+ m_Material: {fileID: 0}
+ m_IsTrigger: 0
+ m_Enabled: 1
+ m_Size: {x: 0.45, y: 0.23149998, z: 0.2}
+ m_Center: {x: 0.19, y: 0, z: 0}
+--- !u!114 &21238542
+MonoBehaviour:
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: b238dfcde8209044b97d23f62bcaadf6, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ boneName: front-upper-arm
+ parentReference: {fileID: 0}
+ mode: 1
+ position: 1
+ rotation: 1
+ scale: 0
+ zPosition: 1
+ overrideAlpha: 1
+--- !u!1 &43338986
+ - component: {fileID: 43338987}
+ - component: {fileID: 43338988}
+ m_Name: root
+ m_Icon: {fileID: 2800000, guid: d1de1604dfe4cb64c9d31246a8e43c78, type: 3}
+--- !u!4 &43338987
+ m_GameObject: {fileID: 43338986}
+ m_LocalRotation: {x: 0, y: 0, z: 0.0024434587, w: 0.999997}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ - {fileID: 1194544916}
+ m_Father: {fileID: 1469977169}
+--- !u!114 &43338988
+ boneName: root
+ mode: 0
+--- !u!1 &103730714
+ - component: {fileID: 103730715}
+ - component: {fileID: 103730719}
+ - component: {fileID: 103730718}
+ - component: {fileID: 103730716}
+ - component: {fileID: 103730717}
+ m_Name: front-bracer
+--- !u!4 &103730715
+ m_GameObject: {fileID: 103730714}
+ m_LocalRotation: {x: 0, y: 0, z: 0.5029445, w: 0.8643187}
+ m_LocalPosition: {x: 0.688, y: -0.0068, z: 0}
+ - {fileID: 976482693}
+ m_Father: {fileID: 21238538}
+--- !u!54 &103730716
+ m_Mass: 0.5625
+--- !u!59 &103730717
+ m_ConnectedBody: {fileID: 21238539}
+ m_ConnectedAnchor: {x: 0.6880002, y: -0.006800114, z: 0}
+ max: 60
+--- !u!65 &103730718
+ m_Size: {x: 0.25, y: 0.13523333, z: 0.2}
+ m_Center: {x: 0.11, y: 0, z: 0}
+--- !u!114 &103730719
+ boneName: front-bracer
+--- !u!1 &147153470
+ - component: {fileID: 147153473}
+ - component: {fileID: 147153472}
+ - component: {fileID: 147153471}
+ m_Name: EventSystem
+--- !u!114 &147153471
+ m_GameObject: {fileID: 147153470}
+ m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3}
+ m_HorizontalAxis: Horizontal
+ m_VerticalAxis: Vertical
+ m_SubmitButton: Submit
+ m_CancelButton: Cancel
+ m_InputActionsPerSecond: 10
+ m_RepeatDelay: 0.5
+ m_ForceModuleActive: 0
+--- !u!114 &147153472
+ m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3}
+ m_FirstSelected: {fileID: 0}
+ m_sendNavigationEvents: 1
+ m_DragThreshold: 5
+--- !u!4 &147153473
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 8
+--- !u!1 &219783486
+ - component: {fileID: 219783490}
+ - component: {fileID: 219783489}
+ - component: {fileID: 219783488}
+ - component: {fileID: 219783487}
+ m_Layer: 5
+ m_Name: Canvas
+--- !u!114 &219783487
+ m_GameObject: {fileID: 219783486}
+ m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
+ m_IgnoreReversedGraphics: 1
+ m_BlockingObjects: 0
+ m_BlockingMask:
+ m_Bits: 4294967295
+--- !u!114 &219783488
+ m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
+ m_UiScaleMode: 1
+ m_ReferencePixelsPerUnit: 100
+ m_ScaleFactor: 1
+ m_ReferenceResolution: {x: 1920, y: 1080}
+ m_ScreenMatchMode: 0
+ m_MatchWidthOrHeight: 0
+ m_PhysicalUnit: 3
+ m_FallbackScreenDPI: 96
+ m_DefaultSpriteDPI: 96
+ m_DynamicPixelsPerUnit: 1
+--- !u!223 &219783489
+Canvas:
+ serializedVersion: 3
+ m_RenderMode: 0
+ m_Camera: {fileID: 0}
+ m_PlaneDistance: 100
+ m_PixelPerfect: 0
+ m_ReceivesEvents: 1
+ m_OverrideSorting: 0
+ m_OverridePixelPerfect: 0
+ m_SortingBucketNormalizedSize: 0
+ m_AdditionalShaderChannelsFlag: 0
+ m_SortingLayerID: 0
+ m_SortingOrder: 0
+ m_TargetDisplay: 0
+--- !u!224 &219783490
+RectTransform:
+ m_LocalScale: {x: 0, y: 0, z: 0}
+ - {fileID: 1701764090}
+ m_RootOrder: 9
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 0, y: 0}
+ m_Pivot: {x: 0, y: 0}
+--- !u!1 &253903406
+ - component: {fileID: 253903409}
+ - component: {fileID: 253903408}
+ - component: {fileID: 253903407}
+ m_Name: square32 (2)
+--- !u!61 &253903407
+BoxCollider2D:
+ m_GameObject: {fileID: 253903406}
+ m_Density: 1
+ m_UsedByEffector: 0
+ m_UsedByComposite: 0
+ m_Offset: {x: 0, y: 0}
+ m_SpriteTilingProperty:
+ border: {x: 0, y: 0, z: 0, w: 0}
+ pivot: {x: 0.5, y: 0.5}
+ oldSize: {x: 0.32, y: 0.32}
+ newSize: {x: 2.2827883, y: 1.2422967}
+ adaptiveTilingThreshold: 0.5
+ drawMode: 0
+ adaptiveTiling: 0
+ m_AutoTiling: 1
+ m_Size: {x: 0.32, y: 0.32}
+ m_EdgeRadius: 0
+--- !u!212 &253903408
+SpriteRenderer:
+ m_CastShadows: 0
+ m_ReceiveShadows: 0
+ m_MotionVectors: 1
+ m_LightProbeUsage: 1
+ m_ReflectionProbeUsage: 1
+ m_Materials:
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
+ m_StaticBatchInfo:
+ firstSubMesh: 0
+ subMeshCount: 0
+ m_StaticBatchRoot: {fileID: 0}
+ m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
+ m_ScaleInLightmap: 1
+ m_PreserveUVs: 0
+ m_IgnoreNormalsForChartDetection: 0
+ m_ImportantGI: 0
+ m_SelectedEditorRenderState: 0
+ m_MinimumChartSize: 4
+ m_AutoUVMaxDistance: 0.5
+ m_AutoUVMaxAngle: 89
+ m_SortingLayer: 0
+ m_Sprite: {fileID: 21300000, guid: 718074e4e56a5404e824bf8e6571ea7d, type: 3}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_FlipX: 0
+ m_FlipY: 0
+ m_DrawMode: 0
+ m_Size: {x: 2.2827883, y: 1.2422967}
+ m_AdaptiveModeThreshold: 0.5
+ m_SpriteTileMode: 0
+ m_WasSpriteAssigned: 1
+--- !u!4 &253903409
+ m_LocalPosition: {x: 2.94, y: -3.61, z: 0}
+ m_LocalScale: {x: 7.1337137, y: 3.8821774, z: 1}
+ m_RootOrder: 5
+--- !u!1 &264945296
+ - component: {fileID: 264945301}
+ - component: {fileID: 264945300}
+ - component: {fileID: 264945299}
+ - component: {fileID: 264945298}
+ - component: {fileID: 264945302}
+ - component: {fileID: 264945297}
+ - component: {fileID: 264945303}
+ - component: {fileID: 264945304}
+ m_Name: Spine GameObject
+--- !u!114 &264945297
+ m_GameObject: {fileID: 264945296}
+ m_Script: {fileID: 11500000, guid: 890d2c67cc206cd4e8a426391c4ccbba, type: 3}
+ timeScale: 1
+ nearBoneName: front-foot-ik
+ farBoneName: rear-foot-ik
+ footSize: {x: 1.07, y: 0.23}
+ footRayRaise: 2
+ comfyDistance: 1
+ centerOfGravityXOffset: -0.25
+ feetTooFarApartThreshold: 3
+ offBalanceThreshold: 1.4
+ minimumSpaceBetweenFeet: 0.5
+ maxNewStepDisplacement: 2
+ shuffleDistance: 1
+ baseLerpSpeed: 3.5
+ forward:
+ xMoveCurve:
+ m_Curve:
+ - serializedVersion: 2
+ time: 0
+ value: 0
+ inSlope: 0
+ outSlope: 0
+ tangentMode: 0
+ time: 0.413171
+ value: 0.17816025
+ inSlope: 1
+ outSlope: 1
+ time: 0.8756303
+ value: 0.9280782
+ inSlope: 0.9635091
+ outSlope: 0.9635091
+ time: 1
+ value: 1
+ inSlope: 0.22421587
+ outSlope: 0.22421587
+ m_PreInfinity: 2
+ m_PostInfinity: 2
+ m_RotationOrder: 0
+ raiseCurve:
+ time: 0.000058000907
+ value: -0.0061350744
+ inSlope: 1.7942295
+ outSlope: 1.7942295
+ time: 0.4610935
+ value: 0.9907105
+ time: 0.7550466
+ value: 0.3163984
+ time: 0.95759964
+ value: 0.0003232956
+ tangentMode: 136
+ time: 0.9968262
+ value: 0.00308609
+ maxRaise: 0.9
+ minDistanceCompensate: 1.1
+ maxDistanceCompensate: 1.7
+ backward:
+ time: 0.4532352
+ value: 0.99693227
+ time: 0.8082802
+ value: 0.012643769
+ inSlope: -0.070329875
+ outSlope: -0.070329875
+ maxRaise: 0.4
+ minDistanceCompensate: 0.7
+ maxDistanceCompensate: 1.2
+ balance: 0
+ distanceBetweenFeet: 0
+ nearFoot:
+ worldPos: {x: 0, y: 0}
+ displacementFromCenter: 0
+ distanceFromCenter: 0
+ lerp: 0
+ worldPosPrev: {x: 0, y: 0}
+ worldPosNext: {x: 0, y: 0}
+ farFoot:
+--- !u!114 &264945298
+ m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3}
+ skeletonDataAsset: {fileID: 11400000, guid: af38a3de26ed9b84abc2fe7c7f3b209d, type: 2}
+ initialSkinName: default
+ initialFlipX: 0
+ initialFlipY: 0
+ separatorSlotNames: []
+ zSpacing: 0
+ useClipping: 1
+ immutableTriangles: 0
+ pmaVertexColors: 1
+ clearStateOnDisable: 0
+ tintBlack: 0
+ singleSubmesh: 0
+ addNormals: 0
+ calculateTangents: 0
+ logErrors: 0
+ disableRenderingOnOverride: 1
+ _animationName: idle
+ loop: 1
+--- !u!23 &264945299
+MeshRenderer:
+ m_CastShadows: 1
+ m_ReceiveShadows: 1
+ - {fileID: 2100000, guid: f89bbf05902e77242a3ad20f3c927353, type: 2}
+ m_SelectedEditorRenderState: 3
+--- !u!33 &264945300
+MeshFilter:
+ m_Mesh: {fileID: 0}
+--- !u!4 &264945301
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0.07, z: 0}
+ - {fileID: 1469977169}
+ m_Father: {fileID: 811443167}
+--- !u!114 &264945302
+ m_Script: {fileID: 11500000, guid: 7f726fb798ad621458c431cb9966d91d, type: 3}
+ boneRoot: {fileID: 1469977169}
+ skeletonRenderer: {fileID: 264945298}
+--- !u!114 &264945303
+ m_Script: {fileID: 11500000, guid: 9d25b0011a425714fbf011e46794c140, type: 3}
+ footPlanter: {fileID: 264945297}
+ eyeSlotName: eye
+ mouthSlotName: mouth
+ shockEyeName: eye-surprised
+ normalEyeName: eye-indifferent
+ shockMouthName: mouth-oooo
+ normalMouthName: mouth-smile
+ balanceThreshold: 3.5
+ shockDuration: 0.25
+ shockTimer: 0
+--- !u!114 &264945304
+ m_Script: {fileID: 11500000, guid: 7e5835d0f54ec08459236279886bfa66, type: 3}
+ planter: {fileID: 264945297}
+ hip: hip
+ head: head
+ hipTiltScale: 7
+ headTiltScale: 0.7
+ hipRotationMoveScale: 60
+ hipRotationTarget: 0
+ hipRotationSmoothed: 0
+ baseHeadRotation: 0
+--- !u!1 &480895071
+ - component: {fileID: 480895076}
+ - component: {fileID: 480895075}
+ - component: {fileID: 480895074}
+ - component: {fileID: 480895073}
+ - component: {fileID: 480895072}
+ m_Name: Main Camera
+ m_TagString: MainCamera
+--- !u!81 &480895072
+AudioListener:
+ m_GameObject: {fileID: 480895071}
+--- !u!124 &480895073
+Behaviour:
+--- !u!92 &480895074
+--- !u!20 &480895075
+Camera:
+ m_ClearFlags: 1
+ m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
+ m_NormalizedViewPortRect:
+ x: 0
+ y: 0
+ width: 1
+ height: 1
+ near clip plane: 0.3
+ far clip plane: 1000
+ field of view: 60
+ orthographic: 1
+ orthographic size: 6.29
+ m_Depth: -1
+ m_CullingMask:
+ m_RenderingPath: -1
+ m_TargetTexture: {fileID: 0}
+ m_TargetEye: 3
+ m_HDR: 1
+ m_AllowMSAA: 1
+ m_ForceIntoRT: 0
+ m_OcclusionCulling: 1
+ m_StereoConvergence: 10
+ m_StereoSeparation: 0.022
+ m_StereoMirrorMode: 0
+--- !u!4 &480895076
+ m_LocalPosition: {x: 0, y: 0, z: -10}
+--- !u!1 &811443163
+ - component: {fileID: 811443167}
+ - component: {fileID: 811443165}
+ - component: {fileID: 811443166}
+ - component: {fileID: 811443164}
+ m_Name: Drunkboy
+--- !u!50 &811443164
+Rigidbody2D:
+ serializedVersion: 4
+ m_GameObject: {fileID: 811443163}
+ m_BodyType: 1
+ m_Simulated: 1
+ m_UseFullKinematicContacts: 0
+ m_UseAutoMass: 0
+ m_Mass: 1
+ m_LinearDrag: 0
+ m_GravityScale: 1
+ m_SleepingMode: 1
+--- !u!114 &811443165
+ m_Script: {fileID: 11500000, guid: ac0a69923492d1b4aa7ca656033ec6a3, type: 3}
+--- !u!61 &811443166
+ m_IsTrigger: 1
+ m_Offset: {x: 0.21, y: 3.42}
+ pivot: {x: 0, y: 0}
+ oldSize: {x: 0, y: 0}
+ newSize: {x: 0, y: 0}
+ adaptiveTilingThreshold: 0
+ m_AutoTiling: 0
+ m_Size: {x: 3.440674, y: 5.6560516}
+--- !u!4 &811443167
+ m_LocalPosition: {x: -3.23, y: -3.39, z: 0}
+ - {fileID: 264945301}
+ m_RootOrder: 1
+--- !u!1 &841681496
+ - component: {fileID: 841681499}
+ - component: {fileID: 841681498}
+ - component: {fileID: 841681497}
+ m_Name: square32
+--- !u!61 &841681497
+ m_GameObject: {fileID: 841681496}
+ newSize: {x: 24.292482, y: 3.5819912}
+--- !u!212 &841681498
+ m_Size: {x: 24.292482, y: 3.5819912}
+--- !u!4 &841681499
+ m_LocalPosition: {x: 0.01, y: -5.05, z: 0}
+ m_LocalScale: {x: 75.91401, y: 11.193723, z: 1}
+ m_RootOrder: 3
+--- !u!1 &885175049
+ - component: {fileID: 885175052}
+ - component: {fileID: 885175051}
+ - component: {fileID: 885175050}
+ m_Name: square32 (1)
+--- !u!61 &885175050
+ m_GameObject: {fileID: 885175049}
+ newSize: {x: 2.2827883, y: 3.5819912}
+--- !u!212 &885175051
+ m_Size: {x: 2.2827883, y: 3.5819912}
+--- !u!4 &885175052
+ m_LocalPosition: {x: 0.72, y: -4.94, z: 0}
+ m_LocalScale: {x: 7.1337137, y: 11.193723, z: 1}
+ m_RootOrder: 4
+--- !u!1 &909672552
+ - component: {fileID: 909672553}
+ - component: {fileID: 909672554}
+ m_Name: torso2
+--- !u!4 &909672553
+ m_GameObject: {fileID: 909672552}
+ m_LocalPosition: {x: 0.4252, y: 0, z: 0}
+ - {fileID: 1828877180}
+ m_Father: {fileID: 2099995169}
+--- !u!114 &909672554
+ boneName: torso2
+--- !u!1 &943283501
+ - component: {fileID: 943283502}
+ m_Name: '## Ground ##'
+--- !u!4 &943283502
+ m_GameObject: {fileID: 943283501}
+ m_LocalPosition: {x: 615.3334, y: 217.33333, z: 0}
+ m_RootOrder: 2
+--- !u!1 &976482692
+ - component: {fileID: 976482693}
+ - component: {fileID: 976482697}
+ - component: {fileID: 976482696}
+ - component: {fileID: 976482695}
+ - component: {fileID: 976482694}
+ m_Name: front-fist
+--- !u!4 &976482693
+ m_GameObject: {fileID: 976482692}
+ m_LocalRotation: {x: 0, y: 0, z: 0.10825962, w: 0.9941227}
+ m_LocalPosition: {x: 0.4057, y: 0.002, z: 0}
+ m_Father: {fileID: 103730715}
+--- !u!59 &976482694
+ m_ConnectedBody: {fileID: 103730716}
+ m_ConnectedAnchor: {x: 0.40570003, y: 0.0019999442, z: 0}
+ min: -30
+--- !u!54 &976482695
+ m_Mass: 0.421875
+--- !u!65 &976482696
+ m_Size: {x: 0.65389997, y: 0.21796666, z: 0.2}
+ m_Center: {x: 0.32694998, y: 0, z: 0}
+--- !u!114 &976482697
+ boneName: front-fist
+--- !u!1 &1052878340
+ - component: {fileID: 1052878343}
+ - component: {fileID: 1052878342}
+ - component: {fileID: 1052878341}
+ m_Name: square32 (3)
+--- !u!61 &1052878341
+ m_GameObject: {fileID: 1052878340}
+ newSize: {x: 6.9804344, y: 3.2069023}
+--- !u!212 &1052878342
+ m_Size: {x: 6.9804344, y: 3.2069023}
+--- !u!4 &1052878343
+ m_LocalRotation: {x: -0, y: -0, z: 0.06090225, w: -0.99814373}
+ m_LocalPosition: {x: -8.12, y: -4.45, z: 0}
+ m_LocalScale: {x: 21.813858, y: 10.02157, z: 1}
+ m_RootOrder: 6
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: -6.9830003}
+--- !u!1 &1194544915
+ - component: {fileID: 1194544916}
+ - component: {fileID: 1194544917}
+ m_Name: hip
+--- !u!4 &1194544916
+ m_GameObject: {fileID: 1194544915}
+ m_LocalPosition: {x: -0.0716, y: 2.2412, z: 0}
+ - {fileID: 2099995169}
+ m_Father: {fileID: 43338987}
+--- !u!114 &1194544917
+ boneName: hip
+--- !u!1 &1469977168
+ - component: {fileID: 1469977169}
+ m_Name: SkeletonUtility-Root
+--- !u!4 &1469977169
+ m_GameObject: {fileID: 1469977168}
+ - {fileID: 43338987}
+ m_Father: {fileID: 264945301}
+--- !u!1 &1701764089
+ - component: {fileID: 1701764090}
+ - component: {fileID: 1701764092}
+ - component: {fileID: 1701764091}
+ m_Name: Text
+--- !u!224 &1701764090
+ m_GameObject: {fileID: 1701764089}
+ m_Father: {fileID: 219783490}
+ m_AnchorMin: {x: 0.5, y: 0.5}
+ m_AnchorMax: {x: 0.5, y: 0.5}
+ m_AnchoredPosition: {x: 32.4, y: -388.7}
+ m_SizeDelta: {x: 650, y: 81.1}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &1701764091
+ m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
+ m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
+ m_RaycastTarget: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+ Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+ m_FontData:
+ m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+ m_FontSize: 32
+ m_FontStyle: 0
+ m_BestFit: 0
+ m_MinSize: 3
+ m_MaxSize: 40
+ m_Alignment: 0
+ m_AlignByGeometry: 0
+ m_RichText: 1
+ m_HorizontalOverflow: 0
+ m_VerticalOverflow: 0
+ m_LineSpacing: 1
+ m_Text: 'Enter PLAY MODE.
+ Click and Drag Spineboy Left and Right
+'
+--- !u!222 &1701764092
+CanvasRenderer:
+--- !u!1 &1828877179
+ - component: {fileID: 1828877180}
+ - component: {fileID: 1828877184}
+ - component: {fileID: 1828877181}
+ - component: {fileID: 1828877182}
+ m_Name: torso3
+--- !u!4 &1828877180
+ m_GameObject: {fileID: 1828877179}
+ m_LocalScale: {x: 0.99999994, y: 0.99999994, z: 1}
+ - {fileID: 21238538}
+ m_Father: {fileID: 909672553}
+--- !u!54 &1828877181
+ m_IsKinematic: 1
+--- !u!114 &1828877182
+ m_Script: {fileID: 11500000, guid: cfeac06b8a6aa1645813700e3e4c0863, type: 3}
+ detachedShadow: 1
+ parent: {fileID: 0}
+ hideShadow: 0
+ physicsSystem: 1
+--- !u!114 &1828877184
+ boneName: torso3
+--- !u!1 &1999119559
+ - component: {fileID: 1999119560}
+ m_Name: '## UI ##'
+--- !u!4 &1999119560
+ m_GameObject: {fileID: 1999119559}
+ m_RootOrder: 7
+--- !u!1 &2099995168
+ - component: {fileID: 2099995169}
+ - component: {fileID: 2099995170}
+ m_Name: torso
+--- !u!4 &2099995169
+ m_GameObject: {fileID: 2099995168}
+ m_LocalRotation: {x: 0, y: 0, z: 0.7371005, w: 0.67578316}
+ m_LocalPosition: {x: -0.0162, y: 0.049, z: 0}
+ - {fileID: 909672553}
+ m_Father: {fileID: 1194544916}
+--- !u!114 &2099995170
+ boneName: torso
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 261ab31a787f69142bbfb6027465aaea
+timeCreated: 1520349924
+licenseType: Free
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
@@ -0,0 +1,6825 @@
+--- !u!1 &70090553
+ - component: {fileID: 70090558}
+ - component: {fileID: 70090557}
+ - component: {fileID: 70090556}
+ - component: {fileID: 70090555}
+ - component: {fileID: 70090554}
+--- !u!81 &70090554
+ m_GameObject: {fileID: 70090553}
+--- !u!124 &70090555
+--- !u!92 &70090556
+--- !u!20 &70090557
+ m_BackGroundColor: {r: 0.6135921, g: 0.6513878, b: 0.71323526, a: 0}
+ orthographic size: 5
+--- !u!4 &70090558
+--- !u!1 &772326263
+ - component: {fileID: 772326266}
+ - component: {fileID: 772326265}
+ - component: {fileID: 772326264}
+ m_Name: GameObject
+--- !u!198 &772326264
+ParticleSystem:
+ m_GameObject: {fileID: 772326263}
+ lengthInSec: 1
+ simulationSpeed: 1
+ looping: 1
+ prewarm: 0
+ playOnAwake: 1
+ autoRandomSeed: 1
+ startDelay:
+ minMaxState: 0
+ scalar: 0
+ minScalar: 0
+ maxCurve:
+ m_RotationOrder: 4
+ minCurve:
+ moveWithTransform: 1
+ moveWithCustomTransform: {fileID: 0}
+ scalingMode: 1
+ randomSeed: -794578668
+ InitialModule:
+ enabled: 1
+ startLifetime:
+ minMaxState: 3
+ scalar: 0.5
+ minScalar: 0.2
+ startSpeed:
+ scalar: 30
+ minScalar: 15
+ startColor:
+ minColor: {r: 1, g: 1, b: 1, a: 1}
+ maxColor: {r: 1, g: 1, b: 1, a: 1}
+ maxGradient:
+ key0: {r: 1, g: 1, b: 1, a: 1}
+ key1: {r: 1, g: 1, b: 1, a: 1}
+ key2: {r: 0, g: 0, b: 0, a: 0}
+ key3: {r: 0, g: 0, b: 0, a: 0}
+ key4: {r: 0, g: 0, b: 0, a: 0}
+ key5: {r: 0, g: 0, b: 0, a: 0}
+ key6: {r: 0, g: 0, b: 0, a: 0}
+ key7: {r: 0, g: 0, b: 0, a: 0}
+ ctime0: 0
+ ctime1: 65535
+ ctime2: 0
+ ctime3: 0
+ ctime4: 0
+ ctime5: 0
+ ctime6: 0
+ ctime7: 0
+ atime0: 0
+ atime1: 65535
+ atime2: 0
+ atime3: 0
+ atime4: 0
+ atime5: 0
+ atime6: 0
+ atime7: 0
+ m_Mode: 0
+ m_NumColorKeys: 2
+ m_NumAlphaKeys: 2
+ minGradient:
+ startSize:
+ scalar: 1
+ minScalar: 1
+ startSizeY:
+ startSizeZ:
+ startRotationX:
+ startRotationY:
+ startRotation:
+ scalar: 0.7853981
+ randomizeRotationDirection: 0
+ maxNumParticles: 1000
+ size3D: 0
+ rotation3D: 0
+ gravityModifier:
+ ShapeModule:
+ type: 10
+ angle: 25
+ length: 5
+ boxX: 3.2321572
+ boxY: 1.06
+ boxZ: 1.18
+ radius:
+ value: 1.2846714
+ spread: 0
+ speed:
+ arc:
+ value: 360
+ placementMode: 0
+ m_MeshRenderer: {fileID: 0}
+ m_SkinnedMeshRenderer: {fileID: 0}
+ m_MeshMaterialIndex: 0
+ m_MeshNormalOffset: 0
+ m_MeshScale: 1
+ m_UseMeshMaterialIndex: 0
+ m_UseMeshColors: 1
+ alignToDirection: 0
+ randomDirectionAmount: 0
+ sphericalDirectionAmount: 0
+ EmissionModule:
+ rateOverTime:
+ minScalar: 10
+ rateOverDistance:
+ m_BurstCount: 1
+ m_Bursts:
+ - time: 0
+ minCount: 4
+ maxCount: 7
+ cycleCount: 1
+ repeatInterval: 0.01
+ SizeModule:
+ curve:
+ minMaxState: 1
+ time: 0.49291992
+ value: 0.05690956
+ y:
+ z:
+ separateAxes: 0
+ RotationModule:
+ enabled: 0
+ x:
+ scalar: 0.7853982
+ minScalar: 0.7853982
+ ColorModule:
+ gradient:
+ key0: {r: 0.5147059, g: 0.9799188, b: 1, a: 1}
+ key1: {r: 1, g: 1, b: 1, a: 0}
+ atime0: 13107
+ atime1: 58018
+ UVModule:
+ frameOverTime:
+ scalar: 0.9999
+ minScalar: 0.9999
+ startFrame:
+ tilesX: 1
+ tilesY: 1
+ animationType: 0
+ rowIndex: 0
+ cycles: 1
+ uvChannelMask: -1
+ flipU: 0
+ flipV: 0
+ randomRow: 1
+ VelocityModule:
+ inWorldSpace: 0
+ InheritVelocityModule:
+ ForceModule:
+ randomizePerFrame: 0
+ ExternalForcesModule:
+ multiplier: 1
+ ClampVelocityModule:
+ magnitude:
+ scalar: 20
+ time: 0.14386451
+ value: 0.15175757
+ inSlope: -0.3902281
+ outSlope: -0.3902281
+ value: 0.05420054
+ separateAxis: 0
+ dampen: 0.5
+ NoiseModule:
+ strength:
+ strengthY:
+ strengthZ:
+ frequency: 0.5
+ damping: 1
+ octaves: 1
+ octaveMultiplier: 0.5
+ octaveScale: 2
+ quality: 2
+ scrollSpeed:
+ remap:
+ remapY:
+ remapZ:
+ remapEnabled: 0
+ SizeBySpeedModule:
+ range: {x: 0, y: 1}
+ RotationBySpeedModule:
+ ColorBySpeedModule:
+ CollisionModule:
+ type: 0
+ collisionMode: 0
+ plane0: {fileID: 0}
+ plane1: {fileID: 0}
+ plane2: {fileID: 0}
+ plane3: {fileID: 0}
+ plane4: {fileID: 0}
+ plane5: {fileID: 0}
+ m_Dampen:
+ m_Bounce:
+ m_EnergyLossOnCollision:
+ minKillSpeed: 0
+ maxKillSpeed: 10000
+ radiusScale: 1
+ collidesWith:
+ maxCollisionShapes: 256
+ quality: 0
+ voxelSize: 0.5
+ collisionMessages: 0
+ collidesWithDynamic: 1
+ interiorCollisions: 1
+ TriggerModule:
+ collisionShape0: {fileID: 0}
+ collisionShape1: {fileID: 0}
+ collisionShape2: {fileID: 0}
+ collisionShape3: {fileID: 0}
+ collisionShape4: {fileID: 0}
+ collisionShape5: {fileID: 0}
+ inside: 1
+ outside: 0
+ enter: 0
+ exit: 0
+ SubModule:
+ subEmitters:
+ - emitter: {fileID: 0}
+ properties: 0
+ LightsModule:
+ ratio: 0
+ light: {fileID: 0}
+ randomDistribution: 1
+ color: 1
+ range: 1
+ intensity: 1
+ rangeCurve:
+ intensityCurve:
+ maxLights: 20
+ TrailModule:
+ ratio: 1
+ lifetime:
+ minVertexDistance: 0.2
+ textureMode: 0
+ worldSpace: 0
+ dieWithParticles: 1
+ sizeAffectsWidth: 1
+ sizeAffectsLifetime: 0
+ inheritParticleColor: 1
+ colorOverLifetime:
+ widthOverTrail:
+ colorOverTrail:
+ CustomDataModule:
+ mode0: 0
+ vectorComponentCount0: 4
+ color0:
+ vector0_0:
+ vector0_1:
+ vector0_2:
+ vector0_3:
+ mode1: 0
+ vectorComponentCount1: 4
+ color1:
+ vector1_0:
+ vector1_1:
+ vector1_2:
+ vector1_3:
+--- !u!199 &772326265
+ParticleSystemRenderer:
+ m_LightProbeUsage: 0
+ m_ReflectionProbeUsage: 0
+ - {fileID: 0}
+ m_SortingOrder: 2
+ m_SortMode: 0
+ m_MinParticleSize: 0
+ m_MaxParticleSize: 0.5
+ m_CameraVelocityScale: 0
+ m_VelocityScale: 0
+ m_LengthScale: 2
+ m_SortingFudge: 0
+ m_NormalDirection: 1
+ m_RenderAlignment: 0
+ m_Pivot: {x: 0, y: 0, z: 0}
+ m_UseCustomVertexStreams: 0
+ m_VertexStreams: 00010304
+ m_Mesh1: {fileID: 0}
+ m_Mesh2: {fileID: 0}
+ m_Mesh3: {fileID: 0}
+--- !u!4 &772326266
+ m_LocalPosition: {x: 0.04, y: 2.41, z: 0}
+ - {fileID: 1698605629}
+ m_Father: {fileID: 1777124192}
+--- !u!1 &1126206818
+ - component: {fileID: 1126206823}
+ - component: {fileID: 1126206822}
+ - component: {fileID: 1126206821}
+ - component: {fileID: 1126206824}
+ - component: {fileID: 1126206820}
+ - component: {fileID: 1126206819}
+ m_Name: Spine GameObject (spineboy-unity)
+--- !u!114 &1126206819
+ m_GameObject: {fileID: 1126206818}
+ m_Script: {fileID: 11500000, guid: 26947ae098a8447408d80c0c86e35b48, type: 3}
+ skeletonRenderer: {fileID: 1126206820}
+ customSlotMaterials: []
+ customMaterialOverrides:
+ - overrideDisabled: 1
+ originalMaterial: {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2}
+ replacementMaterial: {fileID: 2100000, guid: 128e02fa6a4f5964fa898757a425b354,
+ type: 2}
+--- !u!114 &1126206820
+ skeletonDataAsset: {fileID: 11400000, guid: a467507a4ffb1d542a558739b2fede77, type: 2}
+ initialSkinName: base
+--- !u!23 &1126206821
+ - {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2}
+--- !u!33 &1126206822
+--- !u!4 &1126206823
+ m_LocalPosition: {x: -0.2, y: -3.36, z: 0}
+ - {fileID: 1777124192}
+--- !u!114 &1126206824
+ m_Script: {fileID: 11500000, guid: 87a868f5b5bdfef4e89c36f8368d7f39, type: 3}
+ skeletonAnimation: {fileID: 1126206820}
+ freeze: frozen
+ idle: idle
+ freezeColor: {r: 0.71188366, g: 0.93390405, b: 0.97794116, a: 1}
+ freezeBlackColor: {r: 0.020274673, g: 0.6587631, b: 0.9191176, a: 0}
+ particles: {fileID: 772326264}
+ freezePoint: 0.15
+ colorProperty: _Color
+ blackTintProperty: _Black
+--- !u!1 &1698605628
+ - component: {fileID: 1698605629}
+ - component: {fileID: 1698605631}
+ - component: {fileID: 1698605630}
+ m_Name: GameObject (1)
+--- !u!4 &1698605629
+ m_GameObject: {fileID: 1698605628}
+ m_LocalPosition: {x: 0.11999997, y: -2.2199998, z: 0}
+ m_Father: {fileID: 772326266}
+--- !u!198 &1698605630
+ looping: 0
+ randomSeed: 1707078229
+--- !u!199 &1698605631
+--- !u!1 &1777124191
+ - component: {fileID: 1777124192}
+ - component: {fileID: 1777124195}
+ m_Name: Particles
+--- !u!4 &1777124192
+ m_GameObject: {fileID: 1777124191}
+ m_LocalPosition: {x: -0.14759994, y: 2.2935, z: 0}
+ - {fileID: 772326266}
+ m_Father: {fileID: 1126206823}
+--- !u!114 &1777124195
+ m_Script: {fileID: 11500000, guid: a1fd8daaed7b64148a34acb96ba14ce1, type: 3}
+ followZPosition: 0
+ followBoneRotation: 0
+ followSkeletonFlip: 1
+ followLocalScale: 0
+ initializeOnAwake: 1
+guid: abf5f8c4fc1d6ff429f00b34381c5b5a
+timeCreated: 1520592910
@@ -0,0 +1,9 @@
+guid: cf0d5fcb47d4f4f4ba66cee37fa6b1ff
+folderAsset: yes
+timeCreated: 1522746001
@@ -0,0 +1,17 @@
+--- !u!114 &11400000
+ m_GameObject: {fileID: 0}
+ m_Script: {fileID: 11500000, guid: dcf21dc1875a05044835c5a6c969bda4, type: 3}
+ m_Name: Goggles Normal
+ equipType: 1
+ sprite: {fileID: 21300000, guid: 32997c96a91b5904aa064f961fa62937, type: 3}
+ description: Basic goggles. Safety is number one priority.
+ yourStats: 234
+guid: 29c2d64b97744934bb20199d1de50ced
+timeCreated: 1522687661
+NativeFormatImporter:
+ mainObjectFileID: 11400000
+ m_Name: Goggles Tactical
+ sprite: {fileID: 21300000, guid: 4f554405f8f06164db0773d689da243c, type: 3}
+ description: Aimbot Goggles with super damage
+ yourStats: 1241254
+guid: 518292925164b9849b22d3ab5c86de18
+ m_Name: Gun Freeze
+ equipType: 0
+ sprite: {fileID: 21300000, guid: 02c4cbcce432ae74bb2d965060e64d29, type: 3}
+ description: A freeze gun. There's nothing you can do.
+guid: 6575c7c4145c1714f80c46f0652c5e71
+ m_Name: Gun Normal
+ sprite: {fileID: 21300000, guid: 602e098a046fa6e42a109d3e45c590f2, type: 3}
+ description: A pew pew gun.
+ yourStats: 124
+guid: 2459ef647c5bf504fa6d15c3285b1687
@@ -0,0 +1,1912 @@
+ m_MixedBakeMode: 1
+--- !u!1 &18921352
+ - component: {fileID: 18921353}
+ - component: {fileID: 18921356}
+ - component: {fileID: 18921355}
+ - component: {fileID: 18921354}
+ m_Name: Done Button
+--- !u!224 &18921353
+ m_GameObject: {fileID: 18921352}
+ - {fileID: 1240492981}
+ m_Father: {fileID: 1315482509}
+ m_AnchoredPosition: {x: -89, y: -233}
+ m_SizeDelta: {x: 224.8, y: 91.8}
+--- !u!114 &18921354
+ m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
+ m_Navigation:
+ m_Mode: 3
+ m_SelectOnUp: {fileID: 0}
+ m_SelectOnDown: {fileID: 0}
+ m_SelectOnLeft: {fileID: 0}
+ m_SelectOnRight: {fileID: 0}
+ m_Transition: 1
+ m_Colors:
+ m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+ m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+ m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+ m_ColorMultiplier: 1
+ m_FadeDuration: 0.1
+ m_SpriteState:
+ m_HighlightedSprite: {fileID: 0}
+ m_PressedSprite: {fileID: 0}
+ m_DisabledSprite: {fileID: 0}
+ m_AnimationTriggers:
+ m_NormalTrigger: Normal
+ m_HighlightedTrigger: Highlighted
+ m_PressedTrigger: Pressed
+ m_DisabledTrigger: Disabled
+ m_Interactable: 1
+ m_TargetGraphic: {fileID: 18921355}
+ m_OnClick:
+ m_Calls:
+ - m_Target: {fileID: 1913338859}
+ m_MethodName: Done
+ m_Mode: 1
+ m_Arguments:
+ m_ObjectArgument: {fileID: 0}
+ m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
+ m_IntArgument: 0
+ m_FloatArgument: 0
+ m_StringArgument:
+ m_BoolArgument: 0
+ m_CallState: 2
+ m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
+ Culture=neutral, PublicKeyToken=null
+--- !u!114 &18921355
+ m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
+ m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
+ m_Type: 1
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+--- !u!222 &18921356
+--- !u!1 &281390088
+ - component: {fileID: 281390089}
+ - component: {fileID: 281390092}
+ - component: {fileID: 281390091}
+ - component: {fileID: 281390090}
+ - component: {fileID: 281390093}
+--- !u!224 &281390089
+ m_GameObject: {fileID: 281390088}
+ m_LocalScale: {x: 1.000005, y: 1.000005, z: 1.000005}
+ - {fileID: 815656794}
+ m_AnchoredPosition: {x: 110.99994, y: -32.100006}
+ m_SizeDelta: {x: 205, y: 191}
+--- !u!114 &281390090
+ m_HighlightedColor: {r: 1, g: 0.69675463, b: 0.1544118, a: 1}
+ m_PressedColor: {r: 1, g: 0.8534483, b: 0.375, a: 1}
+ m_TargetGraphic: {fileID: 281390091}
+--- !u!114 &281390091
+--- !u!222 &281390092
+--- !u!114 &281390093
+ m_Script: {fileID: 11500000, guid: d818155d239e98d46bb41e307ba270d4, type: 3}
+ asset: {fileID: 11400000, guid: 2459ef647c5bf504fa6d15c3285b1687, type: 2}
+ equipSystem: {fileID: 1913338859}
+ inventoryImage: {fileID: 815656795}
+--- !u!1 &306122553
+ - component: {fileID: 306122554}
+ - component: {fileID: 306122556}
+ - component: {fileID: 306122555}
+ m_Name: Image
+--- !u!224 &306122554
+ m_GameObject: {fileID: 306122553}
+ m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068}
+ m_Father: {fileID: 1650015147}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
+ m_AnchoredPosition: {x: -5, y: -10}
+ m_SizeDelta: {x: 220, y: 220}
+--- !u!114 &306122555
+ m_Material: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
+ m_Sprite: {fileID: 21300000, guid: 02c4cbcce432ae74bb2d965060e64d29, type: 3}
+ m_Type: 0
+ m_PreserveAspect: 1
+--- !u!222 &306122556
+--- !u!1 &345815833
+ - component: {fileID: 345815834}
+ - component: {fileID: 345815837}
+ - component: {fileID: 345815836}
+ - component: {fileID: 345815835}
+ - component: {fileID: 345815838}
+--- !u!224 &345815834
+ m_GameObject: {fileID: 345815833}
+ - {fileID: 1638540999}
+ m_AnchoredPosition: {x: -292.00006, y: -32.100006}
+--- !u!114 &345815835
+ m_TargetGraphic: {fileID: 345815836}
+--- !u!114 &345815836
+--- !u!222 &345815837
+--- !u!114 &345815838
+ asset: {fileID: 11400000, guid: 29c2d64b97744934bb20199d1de50ced, type: 2}
+ inventoryImage: {fileID: 1638541000}
+--- !u!1 &520624624
+ - component: {fileID: 520624629}
+ - component: {fileID: 520624628}
+ - component: {fileID: 520624627}
+ - component: {fileID: 520624626}
+ - component: {fileID: 520624625}
+--- !u!81 &520624625
+ m_GameObject: {fileID: 520624624}
+--- !u!124 &520624626
+--- !u!92 &520624627
+--- !u!20 &520624628
+ m_BackGroundColor: {r: 0.347, g: 0.29411763, b: 0.678, a: 0}
+ m_HDR: 0
+--- !u!4 &520624629
+--- !u!1 &554311660
+ - component: {fileID: 554311661}
+ - component: {fileID: 554311663}
+ - component: {fileID: 554311662}
+ m_Name: Title
+--- !u!224 &554311661
+ m_GameObject: {fileID: 554311660}
+ m_Father: {fileID: 1442798444}
+ m_AnchorMin: {x: 1, y: 1}
+ m_AnchorMax: {x: 1, y: 1}
+ m_AnchoredPosition: {x: -60, y: -60}
+ m_SizeDelta: {x: 600, y: 60}
+ m_Pivot: {x: 0.9999999, y: 1.0000007}
+--- !u!114 &554311662
+ m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
+ m_FontSize: 55
+ m_FontStyle: 1
+ m_MinSize: 10
+ m_MaxSize: 55
+ m_Alignment: 5
+ m_HorizontalOverflow: 1
+ m_VerticalOverflow: 1
+ m_Text: Mix and Match Equip with Buttons
+--- !u!222 &554311663
+--- !u!1 &744080519
+ - component: {fileID: 744080520}
+ - component: {fileID: 744080522}
+ - component: {fileID: 744080521}
+--- !u!224 &744080520
+ m_GameObject: {fileID: 744080519}
+ m_Father: {fileID: 1384627173}
+ m_AnchoredPosition: {x: 8, y: -6}
+ m_SizeDelta: {x: 261, y: 166}
+--- !u!114 &744080521
+ m_Sprite: {fileID: 21300000, guid: 4f554405f8f06164db0773d689da243c, type: 3}
+--- !u!222 &744080522
+--- !u!1 &748959553
+ - component: {fileID: 748959554}
+ - component: {fileID: 748959556}
+ - component: {fileID: 748959555}
+ m_Name: Example Notes
+--- !u!224 &748959554
+ m_GameObject: {fileID: 748959553}
+ m_AnchoredPosition: {x: 27, y: -435}
+ m_SizeDelta: {x: 1531, y: 176}
+--- !u!114 &748959555
+ m_FontSize: 28
+ m_Text: 'This implementation uses a custom skin, template skin and Sprites as the
+ source image. When you "equip" an item, the system will generate a new attachment
+ based on the template attachment, and map a Sprite''s image onto it. It uses Spine.Unity.Modules.AttachmentTools.
+ Pressing "Done" will optimize the skin/attachments. It generates a new skin and
+ new attachments mapped to a new texture repacked from the backing textures of
+ the original attachments.'
+--- !u!222 &748959556
+--- !u!1 &815656793
+ - component: {fileID: 815656794}
+ - component: {fileID: 815656796}
+ - component: {fileID: 815656795}
+--- !u!224 &815656794
+ m_GameObject: {fileID: 815656793}
+ m_Father: {fileID: 281390089}
+ m_AnchoredPosition: {x: -5.0000544, y: -10.000011}
+ m_SizeDelta: {x: 210, y: 203}
+--- !u!114 &815656795
+ m_Sprite: {fileID: 21300000, guid: 602e098a046fa6e42a109d3e45c590f2, type: 3}
+--- !u!222 &815656796
+--- !u!1 &820291492
+ - component: {fileID: 820291493}
+ m_Name: '---- WORLD OBJECTS ----'
+--- !u!4 &820291493
+ m_GameObject: {fileID: 820291492}
+ m_LocalPosition: {x: -4.7074776, y: 0.042612553, z: 0}
+--- !u!1 &906692068
+ - component: {fileID: 906692069}
+ - component: {fileID: 906692071}
+ - component: {fileID: 906692070}
+ m_Name: Panel
+--- !u!224 &906692069
+ m_GameObject: {fileID: 906692068}
+ m_AnchoredPosition: {x: 385, y: 18}
+ m_SizeDelta: {x: -1242, y: -448}
+--- !u!114 &906692070
+ m_Color: {r: 1, g: 1, b: 1, a: 0.392}
+ m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
+--- !u!222 &906692071
+--- !u!1 &1240492980
+ - component: {fileID: 1240492981}
+ - component: {fileID: 1240492983}
+ - component: {fileID: 1240492982}
+--- !u!224 &1240492981
+ m_GameObject: {fileID: 1240492980}
+ m_Father: {fileID: 18921353}
+--- !u!114 &1240492982
+ m_MaxSize: 42
+ m_Alignment: 4
+ m_Text: Done
+--- !u!222 &1240492983
+--- !u!1 &1315482508
+ - component: {fileID: 1315482509}
+ - component: {fileID: 1315482511}
+ - component: {fileID: 1315482510}
+--- !u!224 &1315482509
+ m_GameObject: {fileID: 1315482508}
+ - {fileID: 1650015147}
+ - {fileID: 281390089}
+ - {fileID: 1384627173}
+ - {fileID: 345815834}
+ - {fileID: 18921353}
+ m_AnchoredPosition: {x: 482, y: 0}
+ m_SizeDelta: {x: -964, y: 0}
+--- !u!114 &1315482510
+--- !u!223 &1315482511
+--- !u!1 &1384627172
+ - component: {fileID: 1384627173}
+ - component: {fileID: 1384627176}
+ - component: {fileID: 1384627175}
+ - component: {fileID: 1384627174}
+ - component: {fileID: 1384627177}
+--- !u!224 &1384627173
+ m_GameObject: {fileID: 1384627172}
+ - {fileID: 744080520}
+ m_AnchoredPosition: {x: -292, y: 212.9}
+--- !u!114 &1384627174
+ m_TargetGraphic: {fileID: 1384627175}
+--- !u!114 &1384627175
+--- !u!222 &1384627176
+--- !u!114 &1384627177
+ asset: {fileID: 11400000, guid: 518292925164b9849b22d3ab5c86de18, type: 2}
+ inventoryImage: {fileID: 744080521}
+--- !u!1 &1442798440
+ - component: {fileID: 1442798444}
+ - component: {fileID: 1442798443}
+ - component: {fileID: 1442798442}
+--- !u!114 &1442798442
+ m_GameObject: {fileID: 1442798440}
+ m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
+ m_ReferencePixelsPerUnit: 200
+--- !u!223 &1442798443
+ m_PixelPerfect: 1
+--- !u!224 &1442798444
+ - {fileID: 554311661}
+ - {fileID: 1635156996}
+ - {fileID: 906692069}
+ - {fileID: 1315482509}
+ - {fileID: 748959554}
+--- !u!1 &1635156995
+ - component: {fileID: 1635156996}
+ - component: {fileID: 1635156998}
+ - component: {fileID: 1635156997}
+ m_Name: Instructions
+--- !u!224 &1635156996
+ m_GameObject: {fileID: 1635156995}
+ m_AnchoredPosition: {x: 390, y: 360}
+ m_SizeDelta: {x: 687, y: 32}
+--- !u!114 &1635156997
+ m_Text: Enter play mode and press a button to equip the item.
+--- !u!222 &1635156998
+--- !u!1 &1638540998
+ - component: {fileID: 1638540999}
+ - component: {fileID: 1638541001}
+ - component: {fileID: 1638541000}
+--- !u!224 &1638540999
+ m_GameObject: {fileID: 1638540998}
+ m_Father: {fileID: 345815834}
+--- !u!114 &1638541000
+ m_Sprite: {fileID: 21300000, guid: 32997c96a91b5904aa064f961fa62937, type: 3}
+--- !u!222 &1638541001
+--- !u!1 &1650015146
+ - component: {fileID: 1650015147}
+ - component: {fileID: 1650015150}
+ - component: {fileID: 1650015149}
+ - component: {fileID: 1650015148}
+ - component: {fileID: 1650015151}
+--- !u!224 &1650015147
+ m_GameObject: {fileID: 1650015146}
+ - {fileID: 306122554}
+ m_AnchoredPosition: {x: 111, y: 212.9}
+--- !u!114 &1650015148
+ m_TargetGraphic: {fileID: 1650015149}
+--- !u!114 &1650015149
+--- !u!222 &1650015150
+--- !u!114 &1650015151
+ asset: {fileID: 11400000, guid: 6575c7c4145c1714f80c46f0652c5e71, type: 2}
+ inventoryImage: {fileID: 306122555}
+--- !u!1 &1703211037
+ - component: {fileID: 1703211041}
+ - component: {fileID: 1703211040}
+ - component: {fileID: 1703211039}
+ - component: {fileID: 1703211038}
+ - component: {fileID: 1703211042}
+ m_Name: World Spineboy
+--- !u!114 &1703211038
+ m_GameObject: {fileID: 1703211037}
+ _animationName: walk
+ timeScale: 0.5
+--- !u!23 &1703211039
+ m_SortingOrder: 16
+--- !u!33 &1703211040
+--- !u!4 &1703211041
+ m_LocalPosition: {x: -3.11, y: -2.84, z: 0}
+--- !u!114 &1703211042
+ m_Script: {fileID: 11500000, guid: 5732385e4912c444dae078ddc7d04c89, type: 3}
+ skeletonAnimation: {fileID: 1703211038}
+ templateSkinName: base
+ runtimeMaterial: {fileID: 0}
+ runtimeAtlas: {fileID: 0}
+--- !u!1 &1913338857
+ - component: {fileID: 1913338858}
+ - component: {fileID: 1913338859}
+ m_Name: Mix and Match
+--- !u!4 &1913338858
+ m_GameObject: {fileID: 1913338857}
+--- !u!114 &1913338859
+ m_Script: {fileID: 11500000, guid: 6159005f7c3d5fd4ba33cff41eae5531, type: 3}
+ sourceMaterial: {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2}
+ applyPMA: 1
+ equippables:
+ - type: 0
+ slot: gun
+ templateSkin: base
+ templateAttachment: gun
+ - type: 1
+ slot: goggles
+ templateAttachment: goggles
+ target: {fileID: 1703211042}
+--- !u!1 &2010453060
+ - component: {fileID: 2010453063}
+ - component: {fileID: 2010453062}
+ - component: {fileID: 2010453061}
+--- !u!114 &2010453061
+ m_GameObject: {fileID: 2010453060}
+--- !u!114 &2010453062
+ m_FirstSelected: {fileID: 345815833}
+--- !u!4 &2010453063
+--- !u!1 &2054344576
+ - component: {fileID: 2054344577}
+ m_Name: '---- UI ----'
+--- !u!4 &2054344577
+ m_GameObject: {fileID: 2054344576}
+guid: 689b97bc3d1902b4aa860f704e2c6112
+timeCreated: 1480087951
@@ -118,6 +118,9 @@ GameObject:
- component: {fileID: 32415402}
- component: {fileID: 32415401}
- component: {fileID: 32415400}
+ - component: {fileID: 32415403}
+ - component: {fileID: 32415404}
+ - component: {fileID: 32415405}
m_Layer: 0
m_Name: Eye Target
m_TagString: Untagged
@@ -131,7 +134,7 @@ MeshRenderer:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 32415399}
- m_Enabled: 0
m_CastShadows: 0
m_ReceiveShadows: 0
m_MotionVectors: 1
@@ -171,7 +174,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 5.82, y: 3.59, z: -0.53}
+ m_LocalPosition: {x: 5.82, y: 3.59, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1003754206}
@@ -179,6 +182,62 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &32415403
+ m_GameObject: {fileID: 32415399}
+--- !u!61 &32415404
+ m_Size: {x: 1, y: 1}
+--- !u!50 &32415405
--- !u!1 &122140872
GameObject:
m_ObjectHideFlags: 0
@@ -407,20 +466,22 @@ ParticleSystem:
playOnAwake: 1
autoRandomSeed: 1
startDelay:
minMaxState: 0
scalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
- value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
time: 1
@@ -448,13 +509,15 @@ ParticleSystem:
moveWithTransform: 1
moveWithCustomTransform: {fileID: 0}
scalingMode: 1
- randomSeed: -1951367272
+ randomSeed: 1259711172
InitialModule:
serializedVersion: 3
enabled: 1
startLifetime:
scalar: 0.5
+ minScalar: 5
@@ -492,8 +555,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
startSpeed:
scalar: 5
@@ -533,6 +598,8 @@ ParticleSystem:
startColor:
maxGradient:
key0: {r: 1, g: 1, b: 1, a: 1}
@@ -591,11 +658,11 @@ ParticleSystem:
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 2
- minColor: {r: 1, g: 1, b: 1, a: 1}
- maxColor: {r: 1, g: 1, b: 1, a: 1}
startSize:
minMaxState: 3
scalar: 0.1
+ minScalar: 0.05
@@ -621,8 +688,10 @@ ParticleSystem:
m_RotationOrder: 0
startSizeY:
scalar: 1
@@ -648,8 +717,10 @@ ParticleSystem:
startSizeZ:
@@ -675,8 +746,10 @@ ParticleSystem:
startRotationX:
- scalar: 3.1415927
@@ -702,8 +775,10 @@ ParticleSystem:
startRotationY:
@@ -729,8 +804,10 @@ ParticleSystem:
startRotation:
scalar: 0.87266463
+ minScalar: -0.87266463
@@ -760,8 +837,10 @@ ParticleSystem:
size3D: 0
rotation3D: 0
gravityModifier:
@@ -812,8 +891,10 @@ ParticleSystem:
mode: 0
spread: 0
speed:
@@ -855,8 +936,10 @@ ParticleSystem:
@@ -909,8 +992,10 @@ ParticleSystem:
serializedVersion: 4
rateOverTime:
- scalar: 10
@@ -948,8 +1033,10 @@ ParticleSystem:
rateOverDistance:
@@ -991,8 +1078,10 @@ ParticleSystem:
SizeModule:
enabled: 0
curve:
minMaxState: 1
@@ -1030,8 +1119,10 @@ ParticleSystem:
y:
@@ -1069,8 +1160,10 @@ ParticleSystem:
z:
@@ -1111,8 +1204,10 @@ ParticleSystem:
RotationModule:
x:
- scalar: 1
@@ -1138,8 +1233,10 @@ ParticleSystem:
@@ -1165,8 +1262,10 @@ ParticleSystem:
scalar: 5.2359877
+ minScalar: -5.2359877
@@ -1197,6 +1296,8 @@ ParticleSystem:
gradient:
@@ -1255,13 +1356,13 @@ ParticleSystem:
UVModule:
frameOverTime:
scalar: 0.9999
@@ -1299,8 +1400,10 @@ ParticleSystem:
startFrame:
@@ -1349,8 +1452,10 @@ ParticleSystem:
VelocityModule:
@@ -1388,8 +1493,10 @@ ParticleSystem:
@@ -1427,8 +1534,10 @@ ParticleSystem:
@@ -1470,8 +1579,10 @@ ParticleSystem:
@@ -1511,8 +1622,10 @@ ParticleSystem:
ForceModule:
@@ -1550,8 +1663,10 @@ ParticleSystem:
@@ -1589,8 +1704,10 @@ ParticleSystem:
@@ -1635,8 +1752,10 @@ ParticleSystem:
ClampVelocityModule:
@@ -1674,8 +1793,10 @@ ParticleSystem:
@@ -1713,8 +1834,10 @@ ParticleSystem:
@@ -1752,8 +1875,10 @@ ParticleSystem:
magnitude:
@@ -1796,8 +1921,10 @@ ParticleSystem:
NoiseModule:
strength:
@@ -1835,8 +1962,10 @@ ParticleSystem:
strengthY:
@@ -1874,8 +2003,10 @@ ParticleSystem:
strengthZ:
@@ -1920,8 +2051,10 @@ ParticleSystem:
octaveScale: 2
quality: 2
scrollSpeed:
@@ -1959,8 +2092,10 @@ ParticleSystem:
remap:
@@ -1998,8 +2133,10 @@ ParticleSystem:
remapY:
@@ -2037,8 +2174,10 @@ ParticleSystem:
remapZ:
@@ -2079,8 +2218,10 @@ ParticleSystem:
SizeBySpeedModule:
@@ -2118,8 +2259,10 @@ ParticleSystem:
@@ -2157,8 +2300,10 @@ ParticleSystem:
@@ -2200,8 +2345,10 @@ ParticleSystem:
RotationBySpeedModule:
@@ -2239,8 +2386,10 @@ ParticleSystem:
@@ -2278,8 +2427,10 @@ ParticleSystem:
scalar: 0.7853981
@@ -2323,6 +2474,8 @@ ParticleSystem:
@@ -2381,8 +2534,6 @@ ParticleSystem:
range: {x: 0, y: 1}
CollisionModule:
@@ -2396,8 +2547,10 @@ ParticleSystem:
plane4: {fileID: 0}
plane5: {fileID: 0}
m_Dampen:
@@ -2435,8 +2588,10 @@ ParticleSystem:
m_Bounce:
@@ -2474,8 +2629,10 @@ ParticleSystem:
m_EnergyLossOnCollision:
@@ -2553,8 +2710,10 @@ ParticleSystem:
range: 1
intensity: 1
rangeCurve:
@@ -2592,8 +2751,10 @@ ParticleSystem:
intensityCurve:
@@ -2635,8 +2796,10 @@ ParticleSystem:
ratio: 1
lifetime:
@@ -2683,6 +2846,8 @@ ParticleSystem:
colorOverLifetime:
@@ -2741,11 +2906,11 @@ ParticleSystem:
widthOverTrail:
@@ -2785,6 +2950,8 @@ ParticleSystem:
colorOverTrail:
@@ -2843,8 +3010,6 @@ ParticleSystem:
CustomDataModule:
mode0: 0
@@ -2852,6 +3017,8 @@ ParticleSystem:
color0:
@@ -2910,11 +3077,11 @@ ParticleSystem:
vector0_0:
@@ -2952,8 +3119,10 @@ ParticleSystem:
vector0_1:
@@ -2991,8 +3160,10 @@ ParticleSystem:
vector0_2:
@@ -3030,8 +3201,10 @@ ParticleSystem:
vector0_3:
@@ -3073,6 +3246,8 @@ ParticleSystem:
color1:
@@ -3131,11 +3306,11 @@ ParticleSystem:
vector1_0:
@@ -3173,8 +3348,10 @@ ParticleSystem:
vector1_1:
@@ -3212,8 +3389,10 @@ ParticleSystem:
vector1_2:
@@ -3251,8 +3430,10 @@ ParticleSystem:
vector1_3:
@@ -1,19 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
-SceneSettings:
- m_PVSData:
- m_PVSObjectsArray: []
- m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
- serializedVersion: 7
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
@@ -25,6 +25,7 @@ RenderSettings:
m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
@@ -41,7 +42,7 @@ RenderSettings:
--- !u!157 &4
LightmapSettings:
m_GIWorkflowMode: 1
m_GISettings:
@@ -53,7 +54,7 @@ LightmapSettings:
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
- serializedVersion: 4
m_Resolution: 1
m_BakeResolution: 50
m_TextureWidth: 1024
@@ -66,40 +67,57 @@ LightmapSettings:
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 0
- m_DirectLightInLightProbes: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_LightingDataAsset: {fileID: 0}
- m_RuntimeCPUUsage: 25
--- !u!196 &5
NavMeshSettings:
m_BuildSettings:
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
- accuratePlacement: 0
minRegionArea: 2
- cellSize: 0.16666666
manualCellSize: 0
+ cellSize: 0.16666666
m_NavMeshData: {fileID: 0}
--- !u!1 &36219066
m_Component:
- - 4: {fileID: 36219067}
- - 114: {fileID: 36219069}
- - 114: {fileID: 36219068}
+ - component: {fileID: 36219067}
+ - component: {fileID: 36219069}
+ - component: {fileID: 36219068}
m_Name: rear_foot_goal
@@ -113,13 +131,13 @@ Transform:
m_GameObject: {fileID: 36219066}
- m_LocalRotation: {x: -0, y: -0, z: -0.5187491, w: 0.8549265}
- m_LocalPosition: {x: -2.3325999, y: 1.2458895, z: 0}
+ m_LocalRotation: {x: 0, y: 0, z: -0.52048814, w: 0.8538689}
+ m_LocalPosition: {x: -2.3326, y: 1.2458895, z: 0}
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 973814792}
m_RootOrder: 1
--- !u!114 &36219068
MonoBehaviour:
@@ -165,9 +183,9 @@ GameObject:
- - 4: {fileID: 44654813}
+ - component: {fileID: 44654813}
m_Name: SkeletonUtility-Root
@@ -184,23 +202,25 @@ Transform:
m_LocalPosition: {x: 0, y: 0, z: 0}
- {fileID: 973814792}
m_Father: {fileID: 120294521}
m_RootOrder: 0
--- !u!1 &120294520
- - 4: {fileID: 120294521}
- - 33: {fileID: 120294525}
- - 23: {fileID: 120294524}
- - 114: {fileID: 120294523}
- - 114: {fileID: 120294522}
+ - component: {fileID: 120294521}
+ - component: {fileID: 120294525}
+ - component: {fileID: 120294524}
+ - component: {fileID: 120294523}
+ - component: {fileID: 120294522}
+ - component: {fileID: 120294527}
+ - component: {fileID: 120294526}
m_Name: raptor
@@ -217,11 +237,11 @@ Transform:
m_LocalPosition: {x: 0, y: -0.15, z: 0}
- {fileID: 44654813}
--- !u!114 &120294522
@@ -248,13 +268,17 @@ MonoBehaviour:
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: 22c4b5e5a0fd9484d83b1aa705b9a54c, type: 2}
initialSkinName: default
separatorSlotNames: []
zSpacing: 0
- renderMeshes: 1
immutableTriangles: 0
pmaVertexColors: 1
clearStateOnDisable: 0
- calculateNormals: 0
calculateTangents: 0
logErrors: 0
disableRenderingOnOverride: 1
@@ -275,7 +299,9 @@ MeshRenderer:
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 4e2feebfcaa26a54ab19f1ff3e0eae35, type: 2}
- m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
@@ -283,12 +309,13 @@ MeshRenderer:
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
- m_SelectedWireframeHidden: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_SortingLayerID: 0
m_SortingOrder: 2
--- !u!33 &120294525
MeshFilter:
@@ -297,15 +324,51 @@ MeshFilter:
m_GameObject: {fileID: 120294520}
m_Mesh: {fileID: 0}
+--- !u!61 &120294526
+ m_GameObject: {fileID: 120294520}
+ m_Offset: {x: 1.1056857, y: 5.518404}
+ m_Size: {x: 8.798928, y: 7.601362}
+--- !u!114 &120294527
--- !u!1 &973814791
- - 4: {fileID: 973814792}
- - 114: {fileID: 973814793}
+ - component: {fileID: 973814792}
+ - component: {fileID: 973814793}
m_Name: root
@@ -319,15 +382,15 @@ Transform:
m_GameObject: {fileID: 973814791}
- m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
- {fileID: 1984548219}
- {fileID: 36219067}
m_Father: {fileID: 44654813}
--- !u!114 &973814793
@@ -352,13 +415,13 @@ GameObject:
- - 4: {fileID: 976394127}
- - 20: {fileID: 976394126}
- - 92: {fileID: 976394125}
- - 124: {fileID: 976394124}
- - 81: {fileID: 976394123}
+ - component: {fileID: 976394127}
+ - component: {fileID: 976394126}
+ - component: {fileID: 976394125}
+ - component: {fileID: 976394124}
+ - component: {fileID: 976394123}
m_Name: Main Camera
m_TagString: MainCamera
@@ -417,6 +480,8 @@ Camera:
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
@@ -430,21 +495,21 @@ Transform:
m_LocalPosition: {x: 0, y: 1, z: -12}
--- !u!1 &1497001935
- - 4: {fileID: 1497001939}
- - 33: {fileID: 1497001938}
- - 65: {fileID: 1497001937}
- - 23: {fileID: 1497001936}
+ - component: {fileID: 1497001939}
+ - component: {fileID: 1497001938}
+ - component: {fileID: 1497001937}
+ - component: {fileID: 1497001936}
m_Name: Ground
@@ -466,7 +531,9 @@ MeshRenderer:
- {fileID: 10302, guid: 0000000000000000f000000000000000, type: 0}
@@ -474,12 +541,13 @@ MeshRenderer:
m_SortingOrder: 0
--- !u!65 &1497001937
BoxCollider:
@@ -509,20 +577,20 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: -0.08522272, w: 0.996362}
m_LocalPosition: {x: 0.29366082, y: 0.13593975, z: 2}
m_LocalScale: {x: 13, y: 1, z: 2.6603487}
--- !u!1 &1984548216
- - 4: {fileID: 1984548219}
- - 114: {fileID: 1984548218}
- - 114: {fileID: 1984548217}
+ - component: {fileID: 1984548219}
+ - component: {fileID: 1984548218}
+ - component: {fileID: 1984548217}
m_Name: front_foot_goal
@@ -576,10 +644,10 @@ Transform:
m_GameObject: {fileID: 1984548216}
- m_LocalRotation: {x: -0, y: -0, z: -0.00795751, w: 0.99996835}
- m_LocalPosition: {x: 2.9748998, y: 0.3312556, z: 0}
+ m_LocalRotation: {x: 0, y: 0, z: -0.00829022, w: 0.99996567}
+ m_LocalPosition: {x: 2.9747999, y: 0.33127287, z: 0}
@@ -158,7 +158,7 @@ MonoBehaviour:
skeletonDataAsset: {fileID: 11400000, guid: a467507a4ffb1d542a558739b2fede77, type: 2}
initialSkinName: base
- initialFlipX: 0
+ initialFlipX: 1
initialFlipY: 0
@@ -221,7 +221,7 @@ Transform:
m_GameObject: {fileID: 282891642}
- m_LocalPosition: {x: -8.18, y: -3.48, z: 0}
+ m_LocalPosition: {x: 6.84, y: -3.48, z: 0}
@@ -323,7 +323,7 @@ Transform:
m_GameObject: {fileID: 351144566}
- m_LocalPosition: {x: -0.3, y: -3.48, z: 0}
+ m_LocalPosition: {x: -2.4099998, y: -3.48, z: 0}
- {fileID: 795271517}
@@ -517,6 +517,7 @@ MonoBehaviour:
m_Name:
spineboy: {fileID: 351144567}
+ attackerSpineboy: {fileID: 282891644}
gauge: {fileID: 795271514}
healthText: {fileID: 1847717249}
onAttack:
@@ -567,7 +568,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
- m_AnchoredPosition: {x: 436.7, y: 225.4}
+ m_AnchoredPosition: {x: -781, y: 225.4}
m_SizeDelta: {x: 339.8, y: 53.2}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1053578425
@@ -811,7 +812,7 @@ RectTransform:
- m_AnchoredPosition: {x: -13, y: 343}
+ m_AnchoredPosition: {x: -224, y: 343}
--- !u!114 &1847717249
@@ -35,6 +35,7 @@ namespace Spine.Unity.Examples {
public class AttackSpineboy : MonoBehaviour {
public SkeletonAnimation spineboy;
+ public SkeletonAnimation attackerSpineboy;
public SpineGauge gauge;
public Text healthText;
@@ -48,6 +49,9 @@ namespace Spine.Unity.Examples {
currentHealth -= 10;
healthText.text = currentHealth + "/" + maxHealth;
+ attackerSpineboy.AnimationState.SetAnimation(1, "shoot", false);
+ attackerSpineboy.AnimationState.AddEmptyAnimation(1, 0.5f, 2f);
if (currentHealth > 0) {
spineboy.AnimationState.SetAnimation(0, "hit", false);
spineboy.AnimationState.AddAnimation(0, "idle", true, 0);
@@ -0,0 +1,27 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+namespace Spine.Unity.Examples {
+ public class DraggableTransform : MonoBehaviour {
+ Vector2 mousePreviousWorld, mouseDeltaWorld;
+ Camera mainCamera;
+ void Start () {
+ mainCamera = Camera.main;
+ void Update () {
+ Vector2 mouseCurrent = Input.mousePosition;
+ Vector2 mouseCurrentWorld = mainCamera.ScreenToWorldPoint(new Vector3(mouseCurrent.x, mouseCurrent.y, -mainCamera.transform.position.z));
+ mouseDeltaWorld = mouseCurrentWorld - mousePreviousWorld;
+ mousePreviousWorld = mouseCurrentWorld;
+ void OnMouseDrag () {
+ transform.Translate(mouseDeltaWorld);
@@ -0,0 +1,12 @@
+guid: ac0a69923492d1b4aa7ca656033ec6a3
+timeCreated: 1520587078
+MonoImporter:
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+guid: 39dcbd139c9316f46919f47f9706ca79
+timeCreated: 1522686452
@@ -0,0 +1,14 @@
+ [CreateAssetMenu]
+ public class EquipAssetExample : ScriptableObject {
+ public EquipSystemExample.EquipType equipType;
+ public Sprite sprite;
+ public string description;
+ public int yourStats;
+guid: dcf21dc1875a05044835c5a6c969bda4
+timeCreated: 1522687338
@@ -0,0 +1,31 @@
+using UnityEngine.UI;
+ public class EquipButtonExample : MonoBehaviour {
+ public EquipAssetExample asset;
+ public EquipSystemExample equipSystem;
+ public Image inventoryImage;
+ void OnValidate () {
+ MatchImage();
+ void MatchImage () {
+ if (inventoryImage != null)
+ inventoryImage.sprite = asset.sprite;
+ var button = GetComponent<Button>();
+ button.onClick.AddListener(
+ delegate { equipSystem.Equip(asset); }
+ );
+guid: d818155d239e98d46bb41e307ba270d4
+timeCreated: 1522744049
@@ -0,0 +1,70 @@
+using Spine.Unity.Modules.AttachmentTools;
+ public class EquipSystemExample : MonoBehaviour, IHasSkeletonDataAsset {
+ // Implementing IHasSkeletonDataAsset allows Spine attribute drawers to automatically detect this component as a skeleton data source.
+ public SkeletonDataAsset skeletonDataAsset;
+ SkeletonDataAsset IHasSkeletonDataAsset.SkeletonDataAsset { get { return this.skeletonDataAsset; } }
+ public Material sourceMaterial;
+ public bool applyPMA = true;
+ public List<EquipHook> equippables = new List<EquipHook>();
+ public EquipsVisualsComponentExample target;
+ public Dictionary<EquipAssetExample, Attachment> cachedAttachments = new Dictionary<EquipAssetExample, Attachment>();
+ [System.Serializable]
+ public class EquipHook {
+ public EquipType type;
+ [SpineSlot]
+ public string slot;
+ [SpineSkin]
+ public string templateSkin;
+ [SpineAttachment(skinField:"templateSkin")]
+ public string templateAttachment;
+ public enum EquipType {
+ Gun,
+ Goggles
+ public void Equip (EquipAssetExample asset) {
+ var equipType = asset.equipType;
+ EquipHook howToEquip = equippables.Find(x => x.type == equipType);
+ var skeletonData = skeletonDataAsset.GetSkeletonData(true);
+ int slotIndex = skeletonData.FindSlotIndex(howToEquip.slot);
+ var attachment = GenerateAttachmentFromEquipAsset(asset, slotIndex, howToEquip.templateSkin, howToEquip.templateAttachment);
+ target.Equip(slotIndex, howToEquip.templateAttachment, attachment);
+ Attachment GenerateAttachmentFromEquipAsset (EquipAssetExample asset, int slotIndex, string templateSkinName, string templateAttachmentName) {
+ Attachment attachment;
+ cachedAttachments.TryGetValue(asset, out attachment);
+ if (attachment == null) {
+ var templateSkin = skeletonData.FindSkin(templateSkinName);
+ Attachment templateAttachment = templateSkin.GetAttachment(slotIndex, templateAttachmentName);
+ attachment = templateAttachment.GetRemappedClone(asset.sprite, sourceMaterial, premultiplyAlpha: this.applyPMA);
+ cachedAttachments.Add(asset, attachment); // Cache this value for next time this asset is used.
+ return attachment;
+ public void Done () {
+ target.OptimizeSkin();
+guid: 6159005f7c3d5fd4ba33cff41eae5531
+timeCreated: 1522686506
+ public class EquipsVisualsComponentExample : MonoBehaviour {
+ public SkeletonAnimation skeletonAnimation;
+ public string templateSkinName;
+ Spine.Skin equipsSkin;
+ Spine.Skin collectedSkin;
+ public Material runtimeMaterial;
+ public Texture2D runtimeAtlas;
+ equipsSkin = new Skin("Equips");
+ // OPTIONAL: Add all the attachments from the template skin.
+ var templateSkin = skeletonAnimation.Skeleton.Data.FindSkin(templateSkinName);
+ if (templateSkin != null)
+ equipsSkin.Append(templateSkin);
+ skeletonAnimation.Skeleton.Skin = equipsSkin;
+ RefreshSkeletonAttachments();
+ public void Equip (int slotIndex, string attachmentName, Attachment attachment) {
+ equipsSkin.AddAttachment(slotIndex, attachmentName, attachment);
+ skeletonAnimation.Skeleton.SetSkin(equipsSkin);
+ public void OptimizeSkin () {
+ // 1. Collect all the attachments of all active skins.
+ collectedSkin = collectedSkin ?? new Skin("Collected skin");
+ collectedSkin.Clear();
+ collectedSkin.Append(skeletonAnimation.Skeleton.Data.DefaultSkin);
+ collectedSkin.Append(equipsSkin);
+ // 2. Create a repacked skin.
+ var repackedSkin = collectedSkin.GetRepackedSkin("Repacked skin", skeletonAnimation.SkeletonDataAsset.atlasAssets[0].materials[0], out runtimeMaterial, out runtimeAtlas);
+ // 3. Use the repacked skin.
+ skeletonAnimation.Skeleton.Skin = repackedSkin;
+ void RefreshSkeletonAttachments () {
+ skeletonAnimation.Skeleton.SetSlotsToSetupPose();
+ skeletonAnimation.AnimationState.Apply(skeletonAnimation.Skeleton); //skeletonAnimation.Update(0);
+guid: 5732385e4912c444dae078ddc7d04c89
+timeCreated: 1522688085
@@ -0,0 +1,43 @@
+ public class SpineboyBodyTilt : MonoBehaviour {
+ [Header("Settings")]
+ public SpineboyFootplanter planter;
+ [SpineBone]
+ public string hip = "hip", head = "head";
+ public float hipTiltScale = 7;
+ public float headTiltScale = 0.7f;
+ public float hipRotationMoveScale = 60f;
+ [Header("Debug")]
+ public float hipRotationTarget;
+ public float hipRotationSmoothed;
+ public float baseHeadRotation;
+ Bone hipBone, headBone;
+ var skeletonAnimation = GetComponent<SkeletonAnimation>();
+ var skeleton = skeletonAnimation.Skeleton;
+ hipBone = skeleton.FindBone(hip);
+ headBone = skeleton.FindBone(head);
+ baseHeadRotation = headBone.rotation;
+ skeletonAnimation.UpdateLocal += UpdateLocal;
+ private void UpdateLocal (ISkeletonAnimation animated) {
+ hipRotationTarget = planter.Balance * hipTiltScale;
+ hipRotationSmoothed = Mathf.MoveTowards(hipRotationSmoothed, hipRotationTarget, Time.deltaTime * hipRotationMoveScale * Mathf.Abs(2f * planter.Balance / planter.offBalanceThreshold));
+ hipBone.rotation = hipRotationSmoothed;
+ headBone.rotation = baseHeadRotation + (-hipRotationSmoothed * headTiltScale);
+guid: 7e5835d0f54ec08459236279886bfa66
+timeCreated: 1520582778
+ public class SpineboyFacialExpression : MonoBehaviour {
+ public SpineboyFootplanter footPlanter;
+ public string eyeSlotName, mouthSlotName;
+ [SpineAttachment(slotField:"eyeSlotName")]
+ public string shockEyeName, normalEyeName;
+ [SpineAttachment(slotField: "mouthSlotName")]
+ public string shockMouthName, normalMouthName;
+ public Slot eyeSlot, mouthSlot;
+ public Attachment shockEye, normalEye, shockMouth, normalMouth;
+ public float balanceThreshold = 2.5f;
+ public float shockDuration = 1f;
+ public float shockTimer = 0f;
+ eyeSlot = skeleton.FindSlot(eyeSlotName);
+ mouthSlot = skeleton.FindSlot(mouthSlotName);
+ int eyeSlotIndex = skeleton.FindSlotIndex(eyeSlotName);
+ shockEye = skeleton.GetAttachment(eyeSlotIndex, shockEyeName);
+ normalEye = skeleton.GetAttachment(eyeSlotIndex, normalEyeName);
+ int mouthSlotIndex = skeleton.FindSlotIndex(mouthSlotName);
+ shockMouth = skeleton.GetAttachment(mouthSlotIndex, shockMouthName);
+ normalMouth = skeleton.GetAttachment(mouthSlotIndex, normalMouthName);
+ if (Mathf.Abs(footPlanter.Balance) > balanceThreshold)
+ shockTimer = shockDuration;
+ if (shockTimer > 0)
+ shockTimer -= Time.deltaTime;
+ if (shockTimer > 0) {
+ eyeSlot.attachment = shockEye;
+ mouthSlot.attachment = shockMouth;
+ eyeSlot.attachment = normalEye;
+ mouthSlot.attachment = normalMouth;
+guid: 9d25b0011a425714fbf011e46794c140
+timeCreated: 1520421823
@@ -0,0 +1,208 @@
+using Spine;
+using Spine.Unity;
+ public class SpineboyFootplanter : MonoBehaviour {
+ public float timeScale = 0.5f;
+ [SpineBone] public string nearBoneName, farBoneName;
+ public Vector2 footSize;
+ public float footRayRaise = 2f;
+ public float comfyDistance = 1f;
+ public float centerOfGravityXOffset = -0.25f;
+ public float feetTooFarApartThreshold = 3f;
+ public float offBalanceThreshold = 1.4f;
+ public float minimumSpaceBetweenFeet = 0.5f;
+ public float maxNewStepDisplacement = 2f;
+ public float shuffleDistance = 1f;
+ public float baseLerpSpeed = 3.5f;
+ public FootMovement forward, backward;
+ [SerializeField] float balance;
+ [SerializeField] float distanceBetweenFeet;
+ [SerializeField] Foot nearFoot, farFoot;
+ Skeleton skeleton;
+ Bone nearFootBone, farFootBone;
+ public class FootMovement {
+ public AnimationCurve xMoveCurve;
+ public AnimationCurve raiseCurve;
+ public float maxRaise;
+ public float minDistanceCompensate;
+ public float maxDistanceCompensate;
+ public class Foot {
+ public Vector2 worldPos;
+ public float displacementFromCenter;
+ public float distanceFromCenter;
+ [Space]
+ public float lerp;
+ public Vector2 worldPosPrev;
+ public Vector2 worldPosNext;
+ public bool IsStepInProgress { get { return lerp < 1f; } }
+ public bool IsPrettyMuchDoneStepping { get { return lerp > 0.7f; } }
+ public void UpdateDistance (float centerOfGravityX) {
+ displacementFromCenter = worldPos.x - centerOfGravityX;
+ distanceFromCenter = Mathf.Abs(displacementFromCenter);
+ public void StartNewStep (float newDistance, float centerOfGravityX, float tentativeY, float footRayRaise, RaycastHit2D[] hits, Vector2 footSize) {
+ lerp = 0f;
+ worldPosPrev = worldPos;
+ float newX = centerOfGravityX - newDistance;
+ Vector2 origin = new Vector2(newX, tentativeY + footRayRaise);
+ //int hitCount = Physics2D.BoxCastNonAlloc(origin, footSize, 0f, Vector2.down, hits);
+ int hitCount = Physics2D.BoxCast(origin, footSize, 0f, Vector2.down, new ContactFilter2D { useTriggers = false }, hits);
+ worldPosNext = hitCount > 0 ? hits[0].point : new Vector2(newX, tentativeY);
+ public void UpdateStepProgress (float deltaTime, float stepSpeed, float shuffleDistance, FootMovement forwardMovement, FootMovement backwardMovement) {
+ if (!this.IsStepInProgress)
+ return;
+ lerp += deltaTime * stepSpeed;
+ float strideSignedSize = worldPosNext.x - worldPosPrev.x;
+ float strideSign = Mathf.Sign(strideSignedSize);
+ float strideSize = (Mathf.Abs(strideSignedSize));
+ var movement = strideSign > 0 ? forwardMovement : backwardMovement;
+ worldPos.x = Mathf.Lerp(worldPosPrev.x, worldPosNext.x, movement.xMoveCurve.Evaluate(lerp));
+ float groundLevel = Mathf.Lerp(worldPosPrev.y, worldPosNext.y, lerp);
+ if (strideSize > shuffleDistance) {
+ float strideSizeFootRaise = Mathf.Clamp((strideSize * 0.5f), 1f, 2f);
+ worldPos.y = groundLevel + (movement.raiseCurve.Evaluate(lerp) * movement.maxRaise * strideSizeFootRaise);
+ lerp += Time.deltaTime;
+ worldPos.y = groundLevel;
+ if (lerp > 1f)
+ lerp = 1f;
+ public static float GetNewDisplacement (float otherLegDisplacementFromCenter, float comfyDistance, float minimumFootDistanceX, float maxNewStepDisplacement, FootMovement forwardMovement, FootMovement backwardMovement) {
+ var movement = Mathf.Sign(otherLegDisplacementFromCenter) < 0 ? forwardMovement : backwardMovement;
+ float randomCompensate = Random.Range(movement.minDistanceCompensate, movement.maxDistanceCompensate);
+ float newDisplacement = (otherLegDisplacementFromCenter * randomCompensate);
+ if (Mathf.Abs(newDisplacement) > maxNewStepDisplacement || Mathf.Abs(otherLegDisplacementFromCenter) < minimumFootDistanceX)
+ newDisplacement = comfyDistance * Mathf.Sign(newDisplacement) * randomCompensate;
+ return newDisplacement;
+ public float Balance { get { return balance; } }
+ Time.timeScale = timeScale;
+ var tpos = transform.position;
+ // Default starting positions.
+ nearFoot.worldPos = tpos;
+ nearFoot.worldPos .x -= comfyDistance;
+ nearFoot.worldPosPrev = nearFoot.worldPosNext = nearFoot.worldPos;
+ farFoot.worldPos = tpos;
+ farFoot.worldPos.x += comfyDistance;
+ farFoot.worldPosPrev = farFoot.worldPosNext = farFoot.worldPos;
+ skeleton = skeletonAnimation.Skeleton;
+ nearFootBone = skeleton.FindBone(nearBoneName);
+ farFootBone = skeleton.FindBone(farBoneName);
+ nearFoot.lerp = 1f;
+ farFoot.lerp = 1f;
+ RaycastHit2D[] hits = new RaycastHit2D[1];
+ Transform thisTransform = transform;
+ Vector2 thisTransformPosition = thisTransform.position;
+ float centerOfGravityX = thisTransformPosition.x + centerOfGravityXOffset;
+ nearFoot.UpdateDistance(centerOfGravityX);
+ farFoot.UpdateDistance(centerOfGravityX);
+ balance = nearFoot.displacementFromCenter + farFoot.displacementFromCenter;
+ distanceBetweenFeet = Mathf.Abs(nearFoot.worldPos.x - farFoot.worldPos.x);
+ // Detect time to make a new step
+ bool isTooOffBalance = Mathf.Abs(balance) > offBalanceThreshold;
+ bool isFeetTooFarApart = distanceBetweenFeet > feetTooFarApartThreshold;
+ bool timeForNewStep = isFeetTooFarApart || isTooOffBalance;
+ if (timeForNewStep) {
+ // Choose which foot to use for next step.
+ Foot stepFoot, otherFoot;
+ bool stepLegIsNearLeg = nearFoot.distanceFromCenter > farFoot.distanceFromCenter;
+ if (stepLegIsNearLeg) {
+ stepFoot = nearFoot;
+ otherFoot = farFoot;
+ stepFoot = farFoot;
+ otherFoot = nearFoot;
+ // Start a new step.
+ if (!stepFoot.IsStepInProgress && otherFoot.IsPrettyMuchDoneStepping) {
+ float newDisplacement = Foot.GetNewDisplacement(otherFoot.displacementFromCenter, comfyDistance, minimumSpaceBetweenFeet, maxNewStepDisplacement, forward, backward);
+ stepFoot.StartNewStep(newDisplacement, centerOfGravityX, thisTransformPosition.y, footRayRaise, hits, footSize);
+ float deltaTime = Time.deltaTime;
+ float stepSpeed = baseLerpSpeed;
+ stepSpeed += (Mathf.Abs(balance) - 0.6f) * 2.5f;
+ // Animate steps that are in progress.
+ nearFoot.UpdateStepProgress(deltaTime, stepSpeed, shuffleDistance, forward, backward);
+ farFoot.UpdateStepProgress(deltaTime, stepSpeed, shuffleDistance, forward, backward);
+ nearFootBone.SetPosition(thisTransform.InverseTransformPoint(nearFoot.worldPos));
+ farFootBone.SetPosition(thisTransform.InverseTransformPoint(farFoot.worldPos));
+ void OnDrawGizmos () {
+ if (Application.isPlaying) {
+ const float Radius = 0.15f;
+ Gizmos.color = Color.green;
+ Gizmos.DrawSphere(nearFoot.worldPos, Radius);
+ Gizmos.DrawWireSphere(nearFoot.worldPosNext, Radius);
+ Gizmos.color = Color.magenta;
+ Gizmos.DrawSphere(farFoot.worldPos, Radius);
+ Gizmos.DrawWireSphere(farFoot.worldPosNext, Radius);
+guid: 890d2c67cc206cd4e8a426391c4ccbba
+timeCreated: 1520348323
@@ -0,0 +1,64 @@
+ public class SpineboyFreeze : MonoBehaviour {
+ [SpineAnimation]
+ public string freeze;
+ public string idle;
+ public Color freezeColor;
+ public Color freezeBlackColor;
+ public ParticleSystem particles;
+ public float freezePoint = 0.5f;
+ public string colorProperty = "_Color";
+ public string blackTintProperty = "_Black";
+ MaterialPropertyBlock block;
+ MeshRenderer meshRenderer;
+ IEnumerator Start () {
+ block = new MaterialPropertyBlock();
+ meshRenderer = GetComponent<MeshRenderer>();
+ particles.Stop();
+ particles.Clear();
+ var main = particles.main;
+ main.loop = false;
+ var state = skeletonAnimation.AnimationState;
+ while (true) {
+ yield return new WaitForSeconds(1f);
+ // Play freeze animation
+ state.SetAnimation(0, freeze, false);
+ yield return new WaitForSeconds(freezePoint);
+ // Freeze effects
+ particles.Play();
+ block.SetColor(colorProperty, freezeColor);
+ block.SetColor(blackTintProperty, freezeBlackColor);
+ meshRenderer.SetPropertyBlock(block);
+ yield return new WaitForSeconds(2f);
+ // Return to Idle
+ state.SetAnimation(0, idle, true);
+ block.SetColor(colorProperty, Color.white);
+ block.SetColor(blackTintProperty, Color.black);
+ yield return null;
+guid: 87a868f5b5bdfef4e89c36f8368d7f39
+timeCreated: 1520592011
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: 2f762ed708bf8634481116a5e53c52f2
-timeCreated: 1497568842
+guid: 32997c96a91b5904aa064f961fa62937
+timeCreated: 1522686649
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
@@ -19,7 +19,7 @@ TextureImporter:
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
- isReadable: 0
+ isReadable: 1
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
@@ -53,7 +53,31 @@ TextureImporter:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
- textureCompression: 1
+ textureCompression: 0
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ - buildTarget: Standalone
+ maxTextureSize: 2048
+ textureFormat: -1
+ - buildTarget: Android
+ - buildTarget: WebGL
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
@@ -53,7 +53,7 @@ TextureImporter:
@@ -61,7 +61,7 @@ TextureImporter:
- buildTarget: Standalone
@@ -69,7 +69,7 @@ TextureImporter:
- buildTarget: Android
@@ -77,7 +77,7 @@ TextureImporter:
- buildTarget: WebGL
@@ -61,7 +61,23 @@ TextureImporter:
@@ -0,0 +1,92 @@
+guid: 602e098a046fa6e42a109d3e45c590f2
+TextureImporter:
+ fileIDToRecycleName: {}
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: 1
+ nPOTScale: 0
+ lightmap: 0
+ spriteMode: 1
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spritePixelsToUnits: 100
+ alphaUsage: 1
+ alphaIsTransparency: 1
+ spriteTessellationDetail: -1
+ textureType: 8
+ textureShape: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ platformSettings:
+ - buildTarget: DefaultTexturePlatform
+ spriteSheet:
+ sprites: []
+ outline: []
+ spritePackingTag:
@@ -92,26 +92,30 @@ namespace Spine.Unity.Editor {
// If base property is not found, look for the sibling property.
if (relativeProperty == null) {
string propertyPath = property.propertyPath;
- int localPathLength = 0;
+ int localPathLength = property.name.Length;
- if (property.isArray) {
- const int internalArrayPathLength = 14; // int arrayPathLength = ".Array.data[x]".Length;
+ string newPropertyPath = propertyPath.Remove(propertyPath.Length - localPathLength, localPathLength) + propertyName;
+ relativeProperty = property.serializedObject.FindProperty(newPropertyPath);
+ // If a direct sibling property was not found, try to find the sibling of the array.
+ if (relativeProperty == null && property.isArray) {
int propertyPathLength = propertyPath.Length;
- int n = propertyPathLength - internalArrayPathLength;
- // Find the dot before the array property name and
- // store the total length from the name of the array until the end of the propertyPath.
- for (int i = internalArrayPathLength + 1; i < n; i++) {
+ int dotCount = 0;
+ const int siblingOfListDotCount = 3;
+ for (int i = 1; i < propertyPathLength; i++) {
if (propertyPath[propertyPathLength - i] == '.') {
- localPathLength = i - 1;
- break;
+ dotCount++;
+ if (dotCount >= siblingOfListDotCount) {
+ localPathLength = i - 1;
+ break;
- } else {
- localPathLength = property.name.Length;
- propertyPath = propertyPath.Remove(propertyPath.Length - localPathLength, localPathLength) + propertyName;
- relativeProperty = property.serializedObject.FindProperty(propertyPath);
+ newPropertyPath = propertyPath.Remove(propertyPath.Length - localPathLength, localPathLength) + propertyName;
return relativeProperty;