Merge remote-tracking branch 'origin/3.6-beta' into 3.6-beta

This commit is contained in:
NathanSweet 2017-06-17 18:14:10 +02:00
commit 58a5c8c2f0
78 changed files with 10834 additions and 2000 deletions

View File

@ -74,19 +74,30 @@
* Updated to Unreal Engine 4.16.1. Note that 4.16 has a regression which will make it impossible to compile plain .c files!
## C#
* **Breaking changes**
* `MeshAttachment.parentMesh` is now a private field to enforce using the `.ParentMesh` setter property in external code. The `MeshAttachment.ParentMesh` property is an appropriate replacement wherever `.parentMesh` was used.
* **Additions**
* `AnimationState#apply` returns boolean indicating if any timeline was applied or not.
* `Animation#apply` and `Timeline#apply`` now take enums `MixPose` and `MixDirection` instead of booleans
* **Breaking changes**
* `MeshAttachment.parentMesh` is now a private field to enforce using the `.ParentMesh` setter property in external code. The `MeshAttachment.ParentMesh` property is an appropriate replacement wherever `.parentMesh` was used.
* `Skeleton.GetBounds` takes a scratch array as input so it doesn't have to allocate a new array on each invocation itself. Reduces GC activity.
* Removed `Bone.WorldToLocalRotationX` and `Bone.WorldToLocalRotationY`. Replaced by `Bone.WorldToLocalRotation` (rotation given relative to x-axis, counter-clockwise, in degrees).
* Added `stride` parameter to `VertexAttachment.ComputeWorldVertices`.
* Removed `RegionAttachment.Vertices` field. The vertices array is provided to `RegionAttachment.ComputeWorldVertices` by the API user now.
* Removed `RegionAttachment.UpdateWorldVertices`, added `RegionAttachment.ComputeWorldVertices`. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the provided `worldVertices` array, starting at `offset`, then moving by `stride` array elements when advancing to the next vertex. This allows to directly compose the vertex buffer and avoids a copy. The computation of the full vertices, including vertex colors and texture coordinates, is now done by the backend's respective renderer.
* **Additions**
* Added support for local and relative transform constraint calculation, including additional fields in `TransformConstraintData`
* Added `Bone.localToWorldRotation`(rotation given relative to x-axis, counter-clockwise, in degrees).
* Added two color tinting support, including `TwoColorTimeline` and additional fields on `Slot` and `SlotData`.
* Added `PointAttachment`, additional method `NewPointAttachment` in `AttachmentLoader` interface.
* Added `ClippingAttachment`, additional method `NewClippingAttachment` in `AttachmentLoader` interface.
* Added `SkeletonClipper` and `Triangulator`, used to implement software clipping of attachments.
* `AnimationState.Apply` returns a bool indicating if any timeline was applied or not.
* `Animation.Apply` and `Timeline.Apply`` now take enums `MixPose` and `MixDirection` instead of bools.
### Unity
* Refactored renderer to work with new 3.6 features.
* **Two color tinting** is currently supported via extra UV2 and UV3 mesh vertex streams. To use Two color tinting, you need to:
* switch on "Tint Black" under "Advanced...",
* use the new `Spine/Skeleton Tint Black` shader, or your own shader that treats the UV2 and UV3 streams similarly.
* **Clipping** is now supported. The SkeletonAnimation switches to slightly slower mesh generation code when clipping so limit your use of `ClippingAttachment`s when using on large numbers of skeletons.
* **SkeletonRenderer.initialFlip** Spine components such as SkeletonRenderer, SkeletonAnimation, SkeletonAnimator now has `initialFlipX` and `initialFlipY` fields which are also visible in the inspector under "Advanced...". It will allow you to set and preview a starting flip value for your skeleton component. This is applied immediately after the internal skeleton object is instantiated.
* **Clipping** is now supported. Caution: The SkeletonAnimation switches to slightly slower mesh generation code when clipping so limit your use of `ClippingAttachment`s when using on large numbers of skeletons.
* **SkeletonRenderer.initialFlip** Spine components such as SkeletonRenderer, SkeletonAnimation, SkeletonAnimator now has `initialFlipX` and `initialFlipY` fields which are also visible in the inspector under "Advanced...". It will allow you to set and preview a starting flip value for your skeleton component. This is applied immediately when the internal skeleton object is instantiated.
* **[SpineAttribute] Improvements**
* **Icons have been added to SpineAttributeDrawers**. This should make your default inspectors easier to understand at a glance.
* **Added Constraint Attributes** You can now use `[SpineIkConstraint]` `[SpineTransformConstraint]` `[SpinePathConstraint]`
@ -98,6 +109,7 @@
* **AttachmentTools source material**. `AttachmentTools` methods can now accept a `sourceMaterial` argument to copy material properties from.
* **AttachmentTools Skin Extensions**. Using AttachmentTools, you can now add entries by slot name by also providing a skeleton argument. Also `Append(Skin)`, `RemoveAttachment` and `Clear` have been added.
* **BoneFollower and SkeletonUtilityBone Add RigidBody Button**. The BoneFollower and SkeletonUtilityBone component inspectors will now offer to add a `Rigidbody` or `Rigidbody2D` if it detects a collider of the appropriate type. Having a rigidbody on a moving transform with a collider fits better with the Unity physics systems and prevents excess calculations. It will not detect colliders on child objects so you have to add Rigidbody components manually accordingly.
* **SkeletonRenderer.OnPostProcessVertices** is a new callback that gives you a reference to the MeshGenerator after it has generated a mesh from the current skeleton pose. You can access `meshGenerator.VertexBuffer` or `meshGenerator.ColorBuffer` to modify these before they get pushed into the UnityEngine.Mesh for rendering. This can be useful for non-shader vertex effects.
* **Examples**
* **Examples now use properties**. The code in the example scripts have been switched over to using properties instead of fields to encourage their use for consistency. This is in anticipation of both users who want to move the Spine folders to the Unity Plugins folder (compiled as a different assembly), and of Unity 2017's ability to manually define different assemblies for shorter compilation times.
* **Mix And Match**. The mix-and-match example scene, code and data have been updated to reflect the current recommended setup for animation-compatible custom equip systems The underlying API has changed since 3.5 and the new API calls in MixAndMatch.cs is recommended. Documentation is in progress.
@ -112,7 +124,8 @@
* Render settings in `SkeletonGraphic` can now be accessed under `SkeletonGraphic.MeshGenerator.settings`. This is visible in the SkeletonGraphic inspector as `Advanced...`
* We will continue to bundle the unitypackage with the empty .cs files of deprecated classes until Spine 3.7 to ensure the upgrade process does not break.
* The [SpineAttachment(slotField:)] optional parameter found property value now acts as a Find(slotName) argument rather than Contains(slotName).
* `SkeletonAnimator` now has autoreset set to true by default. Old prefabs and scene values will have been serialized to whatever value it was previously. This change only applies to new instances of SkeletonAnimator.
* `SkeletonAnimator` now uses a `SkeletonAnimator.MecanimTranslator` class to translate an Animator's Mecanim State Machine into skeleton poses. This makes code reuse possible for a Mecanim version of SkeletonGraphic.
* `SkeletonAnimator` `autoreset` and the `mixModes` array are now a part of SkeletonAnimator's MecanimTranslator `.Translator`. `autoReset` is set to true by default. Old prefabs and scene objects with Skeleton Animator may no longer have correct values set.
* Warnings and conditionals checking for specific Unity 5.2-and-below incompatibility have been removed.
## XNA/MonoGame

View File

@ -773,7 +773,7 @@ namespace Spine {
/// <summary>
/// Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
/// loop back to <see cref="TrackEntry.AnimationStart"/> at this time. Defaults to the animation duration.</summary>
public float AnimationEnd { get { return animationEnd; } }
public float AnimationEnd { get { return animationEnd; } set { animationEnd = value; } }
/// <summary>
/// The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this

View File

@ -260,25 +260,27 @@ TextMesh:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 199409354}
m_Text: 'Spine GameObjects are GameObjects
m_Text: '"Spine GameObjects" are GameObjects with
with these components on it:
a SkeletonAnimation
- MeshFilter
(or SkeletonRenderer, SkeletonGraphic or SkeletonAnimator)
- MeshRenderer
- SkeletonAnimation
and its requisite Components.
<b>SkeletonAnimation</b>
is the Spine component you''ll likely be using most often.
It uses a Skeleton Data Asset.
It uses a Skeleton Data Asset (the Unity asset files with the Spine icon).
Skeleton Data Asset ties together your Spine exports (.json, .png and .atlas.txt)
<b>SkeletonData Asset</b>
(the asset files with the Spine icon)
SkeletonDataAssets ties together your Spine exports (.json, .png and .atlas.txt)
See the Spine-Unity Documentation to learn more about the asset files.
@ -556,7 +558,7 @@ TextMesh:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1945923976}
m_Text: Enter <b>PLAY MODE</b> in Unity to see Spineboy animate.
m_Text: Enter <b>PLAY MODE</b> in Unity to see Spine-Unity Girl animate.
m_OffsetZ: 0
m_CharacterSize: 0.12
m_LineSpacing: 1

View File

@ -147,7 +147,7 @@ TextMesh:
m_GameObject: {fileID: 199409354}
m_Text: 'This scene will show you an example
of basic animation control through code.
of basic animation code.
Open the SpineBeginnerTwo script attached
@ -317,8 +317,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3}
m_Name:
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: a467507a4ffb1d542a558739b2fede77, type: 2}
initialSkinName: base
skeletonDataAsset: {fileID: 11400000, guid: 45a15bf53b040de42b2adbc759a40203, type: 2}
initialSkinName: default
initialFlipX: 0
initialFlipY: 0
separatorSlotNames: []
@ -349,7 +349,7 @@ MeshRenderer:
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2}
- {fileID: 2100000, guid: 86873d92b9c6412428e6e2d4f827c88b, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
@ -403,6 +403,8 @@ MonoBehaviour:
idleAnimationName: idle
walkAnimationName: walk
shootAnimationName: shoot
idleTurnAnimationName: idle-turn
runToIdleAnimationName: run-to-idle
--- !u!1 &926099111
GameObject:
m_ObjectHideFlags: 0

View File

@ -152,7 +152,7 @@ MonoBehaviour:
state: 0
facingLeft: 0
currentSpeed: 0
shootInterval: 0.1
shootInterval: 0.15
--- !u!1 &320097517
GameObject:
m_ObjectHideFlags: 0
@ -854,7 +854,14 @@ TextMesh:
See the PLAYER INPUT, PLAYER Spineboy and VIEW Spineboy
GameObjects and the scripts on them, to learn more.'
GameObjects and the scripts on them, to learn more.
You may opt to arrange your scripts in a different way, of course.
But compartmentalizing concerns among scripts by the right amount can
help you manage your script logic better.'
m_OffsetZ: 0
m_CharacterSize: 0.12
m_LineSpacing: 1
@ -1234,8 +1241,10 @@ ParticleSystem:
playOnAwake: 0
autoRandomSeed: 1
startDelay:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1268,8 +1277,10 @@ ParticleSystem:
serializedVersion: 3
enabled: 1
startLifetime:
serializedVersion: 2
minMaxState: 3
scalar: 0.5
minScalar: 0.3
maxCurve:
serializedVersion: 2
m_Curve:
@ -1295,8 +1306,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 0
startSpeed:
serializedVersion: 2
minMaxState: 3
scalar: 35
minScalar: 5
maxCurve:
serializedVersion: 2
m_Curve:
@ -1324,6 +1337,8 @@ ParticleSystem:
startColor:
serializedVersion: 2
minMaxState: 2
minColor: {r: 1, g: 0.98039216, b: 0.7294118, a: 1}
maxColor: {r: 1, g: 0.5019608, b: 0.11764706, a: 1}
maxGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@ -1382,11 +1397,11 @@ ParticleSystem:
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 2
minColor: {r: 1, g: 0.98039216, b: 0.7294118, a: 1}
maxColor: {r: 1, g: 0.5019608, b: 0.11764706, a: 1}
startSize:
serializedVersion: 2
minMaxState: 3
scalar: 0.5
minScalar: 0.2
maxCurve:
serializedVersion: 2
m_Curve:
@ -1412,8 +1427,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 0
startSizeY:
serializedVersion: 2
minMaxState: 3
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1439,8 +1456,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 0
startSizeZ:
serializedVersion: 2
minMaxState: 3
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1466,8 +1485,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 0
startRotationX:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1505,8 +1526,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
startRotationY:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1544,8 +1567,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
startRotation:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1587,8 +1612,10 @@ ParticleSystem:
size3D: 0
rotation3D: 0
gravityModifier:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1639,8 +1666,10 @@ ParticleSystem:
mode: 0
spread: 0
speed:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1682,8 +1711,10 @@ ParticleSystem:
mode: 0
spread: 0
speed:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1736,8 +1767,10 @@ ParticleSystem:
enabled: 1
serializedVersion: 4
rateOverTime:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1775,8 +1808,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
rateOverDistance:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1823,8 +1858,10 @@ ParticleSystem:
SizeModule:
enabled: 1
curve:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1868,8 +1905,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
y:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1907,8 +1946,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
z:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1949,8 +1990,10 @@ ParticleSystem:
RotationModule:
enabled: 0
x:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1988,8 +2031,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
y:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2027,8 +2072,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
curve:
serializedVersion: 2
minMaxState: 0
scalar: 0.7853982
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2071,6 +2118,8 @@ ParticleSystem:
gradient:
serializedVersion: 2
minMaxState: 1
minColor: {r: 1, g: 1, b: 1, a: 1}
maxColor: {r: 1, g: 1, b: 1, a: 1}
maxGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@ -2129,13 +2178,13 @@ 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}
UVModule:
enabled: 0
frameOverTime:
serializedVersion: 2
minMaxState: 1
scalar: 0.9999
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2173,8 +2222,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
startFrame:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2223,8 +2274,10 @@ ParticleSystem:
VelocityModule:
enabled: 0
x:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2262,8 +2315,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
y:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2301,8 +2356,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
z:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2344,8 +2401,10 @@ ParticleSystem:
enabled: 0
m_Mode: 0
m_Curve:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2385,8 +2444,10 @@ ParticleSystem:
ForceModule:
enabled: 0
x:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2424,8 +2485,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
y:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2463,8 +2526,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
z:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2509,8 +2574,10 @@ ParticleSystem:
ClampVelocityModule:
enabled: 1
x:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2548,8 +2615,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
y:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2587,8 +2656,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
z:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2626,8 +2697,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
magnitude:
serializedVersion: 2
minMaxState: 1
scalar: 20
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2670,8 +2743,10 @@ ParticleSystem:
NoiseModule:
enabled: 0
strength:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2709,8 +2784,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
strengthY:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2748,8 +2825,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
strengthZ:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2794,8 +2873,10 @@ ParticleSystem:
octaveScale: 2
quality: 2
scrollSpeed:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2833,8 +2914,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
remap:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2872,8 +2955,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
remapY:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2911,8 +2996,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
remapZ:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2953,8 +3040,10 @@ ParticleSystem:
SizeBySpeedModule:
enabled: 0
curve:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2992,8 +3081,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
y:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3031,8 +3122,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
z:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3074,8 +3167,10 @@ ParticleSystem:
RotationBySpeedModule:
enabled: 0
x:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3113,8 +3208,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
y:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3152,8 +3249,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
curve:
serializedVersion: 2
minMaxState: 0
scalar: 0.7853982
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3197,6 +3296,8 @@ ParticleSystem:
gradient:
serializedVersion: 2
minMaxState: 1
minColor: {r: 1, g: 1, b: 1, a: 1}
maxColor: {r: 1, g: 1, b: 1, a: 1}
maxGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@ -3255,8 +3356,6 @@ 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}
range: {x: 0, y: 1}
CollisionModule:
enabled: 0
@ -3270,8 +3369,10 @@ ParticleSystem:
plane4: {fileID: 0}
plane5: {fileID: 0}
m_Dampen:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3309,8 +3410,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
m_Bounce:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3348,8 +3451,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
m_EnergyLossOnCollision:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3427,8 +3532,10 @@ ParticleSystem:
range: 1
intensity: 1
rangeCurve:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3466,8 +3573,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
intensityCurve:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3509,8 +3618,10 @@ ParticleSystem:
enabled: 0
ratio: 1
lifetime:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3557,6 +3668,8 @@ ParticleSystem:
colorOverLifetime:
serializedVersion: 2
minMaxState: 0
minColor: {r: 1, g: 1, b: 1, a: 1}
maxColor: {r: 1, g: 1, b: 1, a: 1}
maxGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@ -3615,11 +3728,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}
widthOverTrail:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3659,6 +3772,8 @@ ParticleSystem:
colorOverTrail:
serializedVersion: 2
minMaxState: 0
minColor: {r: 1, g: 1, b: 1, a: 1}
maxColor: {r: 1, g: 1, b: 1, a: 1}
maxGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@ -3717,8 +3832,6 @@ 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}
CustomDataModule:
enabled: 0
mode0: 0
@ -3726,6 +3839,8 @@ ParticleSystem:
color0:
serializedVersion: 2
minMaxState: 0
minColor: {r: 1, g: 1, b: 1, a: 1}
maxColor: {r: 1, g: 1, b: 1, a: 1}
maxGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@ -3784,11 +3899,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}
vector0_0:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3826,8 +3941,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
vector0_1:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3865,8 +3982,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
vector0_2:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3904,8 +4023,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
vector0_3:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3947,6 +4068,8 @@ ParticleSystem:
color1:
serializedVersion: 2
minMaxState: 0
minColor: {r: 1, g: 1, b: 1, a: 1}
maxColor: {r: 1, g: 1, b: 1, a: 1}
maxGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@ -4005,11 +4128,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}
vector1_0:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -4047,8 +4170,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
vector1_1:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -4086,8 +4211,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
vector1_2:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -4125,8 +4252,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
vector1_3:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:

View File

@ -242,120 +242,6 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &757780186
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 100000, guid: d51ed5943e10bcb4394b5eec480293f8, type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 757780190}
- component: {fileID: 757780189}
- component: {fileID: 757780188}
- component: {fileID: 757780187}
m_Layer: 0
m_Name: dragon (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &757780187
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11400000, guid: d51ed5943e10bcb4394b5eec480293f8,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 757780186}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3}
m_Name:
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: 76506fa7fbeed084ab2dfb084648c628, type: 2}
initialSkinName: default
initialFlipX: 0
initialFlipY: 0
separatorSlotNames: []
zSpacing: 0
useClipping: 1
immutableTriangles: 0
pmaVertexColors: 1
clearStateOnDisable: 0
tintBlack: 0
singleSubmesh: 0
addNormals: 1
calculateTangents: 0
logErrors: 0
disableRenderingOnOverride: 1
_animationName: flying
loop: 1
timeScale: 1
--- !u!23 &757780188
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 2300000, guid: d51ed5943e10bcb4394b5eec480293f8,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 757780186}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: d58543c96f991934ca874395eb40222c, type: 2}
- {fileID: 2100000, guid: 3277fd5561d95724e83c6ca4a1dd28a4, type: 2}
- {fileID: 2100000, guid: d58543c96f991934ca874395eb40222c, type: 2}
- {fileID: 2100000, guid: 3277fd5561d95724e83c6ca4a1dd28a4, type: 2}
- {fileID: 2100000, guid: d58543c96f991934ca874395eb40222c, type: 2}
- {fileID: 2100000, guid: 3277fd5561d95724e83c6ca4a1dd28a4, type: 2}
- {fileID: 2100000, guid: d58543c96f991934ca874395eb40222c, type: 2}
- {fileID: 2100000, guid: 3277fd5561d95724e83c6ca4a1dd28a4, type: 2}
- {fileID: 2100000, guid: d58543c96f991934ca874395eb40222c, type: 2}
- {fileID: 2100000, guid: 3277fd5561d95724e83c6ca4a1dd28a4, type: 2}
- {fileID: 2100000, guid: d58543c96f991934ca874395eb40222c, type: 2}
- {fileID: 2100000, guid: 3277fd5561d95724e83c6ca4a1dd28a4, type: 2}
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: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &757780189
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 3300000, guid: d51ed5943e10bcb4394b5eec480293f8,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 757780186}
m_Mesh: {fileID: 0}
--- !u!4 &757780190
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 400000, guid: d51ed5943e10bcb4394b5eec480293f8, type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 757780186}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1604340971
GameObject:
m_ObjectHideFlags: 0
@ -520,6 +406,7 @@ MeshRenderer:
- {fileID: 2100000, guid: 3277fd5561d95724e83c6ca4a1dd28a4, type: 2}
- {fileID: 2100000, guid: d58543c96f991934ca874395eb40222c, type: 2}
- {fileID: 2100000, guid: 3277fd5561d95724e83c6ca4a1dd28a4, type: 2}
- {fileID: 2100000, guid: d58543c96f991934ca874395eb40222c, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0

View File

@ -249,8 +249,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3}
m_Name:
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: 44691b56ed7d1f04da0cbc2a52a91b8d, type: 2}
initialSkinName: default
skeletonDataAsset: {fileID: 11400000, guid: a467507a4ffb1d542a558739b2fede77, type: 2}
initialSkinName: base
initialFlipX: 0
initialFlipY: 0
separatorSlotNames:
@ -519,8 +519,10 @@ ParticleSystem:
playOnAwake: 1
autoRandomSeed: 1
startDelay:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -565,8 +567,10 @@ ParticleSystem:
serializedVersion: 3
enabled: 1
startLifetime:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -604,8 +608,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
startSpeed:
serializedVersion: 2
minMaxState: 0
scalar: 1.5
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -645,6 +651,8 @@ ParticleSystem:
startColor:
serializedVersion: 2
minMaxState: 0
minColor: {r: 1, g: 1, b: 1, a: 1}
maxColor: {r: 1, g: 0.5176471, b: 0, a: 1}
maxGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@ -703,11 +711,11 @@ ParticleSystem:
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 2
minColor: {r: 1, g: 1, b: 1, a: 1}
maxColor: {r: 1, g: 0.5176471, b: 0, a: 1}
startSize:
serializedVersion: 2
minMaxState: 0
scalar: 0.5
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -745,8 +753,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
startSizeY:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -784,8 +794,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
startSizeZ:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -823,8 +835,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
startRotationX:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -862,8 +876,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
startRotationY:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -901,8 +917,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
startRotation:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -944,8 +962,10 @@ ParticleSystem:
size3D: 0
rotation3D: 0
gravityModifier:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -996,8 +1016,10 @@ ParticleSystem:
mode: 0
spread: 0
speed:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1039,8 +1061,10 @@ ParticleSystem:
mode: 0
spread: 0
speed:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1093,8 +1117,10 @@ ParticleSystem:
enabled: 1
serializedVersion: 4
rateOverTime:
serializedVersion: 2
minMaxState: 0
scalar: 50
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1132,8 +1158,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
rateOverDistance:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1175,8 +1203,10 @@ ParticleSystem:
SizeModule:
enabled: 1
curve:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1220,8 +1250,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
y:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1259,8 +1291,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
z:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1301,8 +1335,10 @@ ParticleSystem:
RotationModule:
enabled: 0
x:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1340,8 +1376,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
y:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1379,8 +1417,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
curve:
serializedVersion: 2
minMaxState: 0
scalar: 0.7853982
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1423,6 +1463,8 @@ ParticleSystem:
gradient:
serializedVersion: 2
minMaxState: 1
minColor: {r: 1, g: 1, b: 1, a: 1}
maxColor: {r: 1, g: 1, b: 1, a: 1}
maxGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@ -1481,13 +1523,13 @@ 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}
UVModule:
enabled: 0
frameOverTime:
serializedVersion: 2
minMaxState: 1
scalar: 0.9999
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1525,8 +1567,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
startFrame:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1575,8 +1619,10 @@ ParticleSystem:
VelocityModule:
enabled: 0
x:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1614,8 +1660,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
y:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1653,8 +1701,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
z:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1696,8 +1746,10 @@ ParticleSystem:
enabled: 0
m_Mode: 0
m_Curve:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1737,8 +1789,10 @@ ParticleSystem:
ForceModule:
enabled: 0
x:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1776,8 +1830,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
y:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1815,8 +1871,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
z:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1861,8 +1919,10 @@ ParticleSystem:
ClampVelocityModule:
enabled: 1
x:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1900,8 +1960,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
y:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1939,8 +2001,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
z:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -1978,8 +2042,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
magnitude:
serializedVersion: 2
minMaxState: 1
scalar: 20
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2022,8 +2088,10 @@ ParticleSystem:
NoiseModule:
enabled: 0
strength:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2061,8 +2129,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
strengthY:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2100,8 +2170,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
strengthZ:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2146,8 +2218,10 @@ ParticleSystem:
octaveScale: 2
quality: 2
scrollSpeed:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2185,8 +2259,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
remap:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2224,8 +2300,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
remapY:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2263,8 +2341,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
remapZ:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2305,8 +2385,10 @@ ParticleSystem:
SizeBySpeedModule:
enabled: 0
curve:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2344,8 +2426,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
y:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2383,8 +2467,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
z:
serializedVersion: 2
minMaxState: 1
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2426,8 +2512,10 @@ ParticleSystem:
RotationBySpeedModule:
enabled: 0
x:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2465,8 +2553,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
y:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2504,8 +2594,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
curve:
serializedVersion: 2
minMaxState: 0
scalar: 0.7853982
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2549,6 +2641,8 @@ ParticleSystem:
gradient:
serializedVersion: 2
minMaxState: 1
minColor: {r: 1, g: 1, b: 1, a: 1}
maxColor: {r: 1, g: 1, b: 1, a: 1}
maxGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@ -2607,8 +2701,6 @@ 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}
range: {x: 0, y: 1}
CollisionModule:
enabled: 0
@ -2622,8 +2714,10 @@ ParticleSystem:
plane4: {fileID: 0}
plane5: {fileID: 0}
m_Dampen:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2661,8 +2755,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
m_Bounce:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2700,8 +2796,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
m_EnergyLossOnCollision:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2779,8 +2877,10 @@ ParticleSystem:
range: 1
intensity: 1
rangeCurve:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2818,8 +2918,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
intensityCurve:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2861,8 +2963,10 @@ ParticleSystem:
enabled: 0
ratio: 1
lifetime:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -2909,6 +3013,8 @@ ParticleSystem:
colorOverLifetime:
serializedVersion: 2
minMaxState: 0
minColor: {r: 1, g: 1, b: 1, a: 1}
maxColor: {r: 1, g: 1, b: 1, a: 1}
maxGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@ -2967,11 +3073,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}
widthOverTrail:
serializedVersion: 2
minMaxState: 0
scalar: 1
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3011,6 +3117,8 @@ ParticleSystem:
colorOverTrail:
serializedVersion: 2
minMaxState: 0
minColor: {r: 1, g: 1, b: 1, a: 1}
maxColor: {r: 1, g: 1, b: 1, a: 1}
maxGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@ -3069,8 +3177,6 @@ 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}
CustomDataModule:
enabled: 0
mode0: 0
@ -3078,6 +3184,8 @@ ParticleSystem:
color0:
serializedVersion: 2
minMaxState: 0
minColor: {r: 1, g: 1, b: 1, a: 1}
maxColor: {r: 1, g: 1, b: 1, a: 1}
maxGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@ -3136,11 +3244,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}
vector0_0:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3178,8 +3286,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
vector0_1:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3217,8 +3327,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
vector0_2:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3256,8 +3368,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
vector0_3:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3299,6 +3413,8 @@ ParticleSystem:
color1:
serializedVersion: 2
minMaxState: 0
minColor: {r: 1, g: 1, b: 1, a: 1}
maxColor: {r: 1, g: 1, b: 1, a: 1}
maxGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@ -3357,11 +3473,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}
vector1_0:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3399,8 +3515,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
vector1_1:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3438,8 +3556,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
vector1_2:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -3477,8 +3597,10 @@ ParticleSystem:
m_PostInfinity: 2
m_RotationOrder: 4
vector1_3:
serializedVersion: 2
minMaxState: 0
scalar: 0
minScalar: 0
maxCurve:
serializedVersion: 2
m_Curve:
@ -4306,8 +4428,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3}
m_Name:
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: 44691b56ed7d1f04da0cbc2a52a91b8d, type: 2}
initialSkinName: default
skeletonDataAsset: {fileID: 11400000, guid: a467507a4ffb1d542a558739b2fede77, type: 2}
initialSkinName: base
initialFlipX: 0
initialFlipY: 0
separatorSlotNames:

View File

@ -119,6 +119,8 @@ GameObject:
- component: {fileID: 351144569}
- component: {fileID: 351144568}
- component: {fileID: 351144567}
- component: {fileID: 351144571}
- component: {fileID: 351144572}
m_Layer: 0
m_Name: Spine GameObject (spineboy)
m_TagString: Untagged
@ -137,8 +139,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3}
m_Name:
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: 44691b56ed7d1f04da0cbc2a52a91b8d, type: 2}
initialSkinName: default
skeletonDataAsset: {fileID: 11400000, guid: a467507a4ffb1d542a558739b2fede77, type: 2}
initialSkinName: base
initialFlipX: 0
initialFlipY: 0
separatorSlotNames: []
@ -169,7 +171,7 @@ MeshRenderer:
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2}
- {fileID: 2100000, guid: 128e02fa6a4f5964fa898757a425b354, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
@ -209,6 +211,40 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &351144571
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 351144566}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 26947ae098a8447408d80c0c86e35b48, type: 3}
m_Name:
m_EditorClassIdentifier:
skeletonRenderer: {fileID: 351144567}
customSlotMaterials: []
customMaterialOverrides:
- overrideDisabled: 0
originalMaterial: {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2}
replacementMaterial: {fileID: 2100000, guid: 128e02fa6a4f5964fa898757a425b354,
type: 2}
--- !u!114 &351144572
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 351144566}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 395f769061839bf488f157c37d23835d, type: 3}
m_Name:
m_EditorClassIdentifier:
flashCount: 3
flashColor: {r: 1, g: 1, b: 1, a: 1}
interval: 0.016666668
fillPhaseProperty: _FillPhase
fillColorProperty: _FillColor
--- !u!1 &795271513
GameObject:
m_ObjectHideFlags: 0
@ -364,6 +400,22 @@ MonoBehaviour:
spineboy: {fileID: 351144567}
gauge: {fileID: 795271514}
healthText: {fileID: 1847717249}
onAttack:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 351144572}
m_MethodName: Flash
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.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
--- !u!1 &1053578423
GameObject:
m_ObjectHideFlags: 0

View File

@ -205,6 +205,86 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &394849622
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 394849623}
- component: {fileID: 394849625}
- component: {fileID: 394849624}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &394849623
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 394849622}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2107709637}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -0.000024796, y: -294}
m_SizeDelta: {x: 412, y: 120.85}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &394849624
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 394849622}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, 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: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'Use of the lit sprite shaders with normal maps requires Tangents. Tangents
can be generated by SkeletonAnimation by checking "Solve Tangents" under the "Advanced..."
foldout in its inspector.''
The bundled sprite shaders are capable of assuming a fixed normal so there is
no need for "Add Normals" to be checked under Advanced.'
--- !u!222 &394849625
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 394849622}
--- !u!1 &770573969
GameObject:
m_ObjectHideFlags: 0
@ -720,6 +800,68 @@ SpriteRenderer:
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
--- !u!1 &1537129159
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1537129162}
- component: {fileID: 1537129161}
- component: {fileID: 1537129160}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1537129160
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1537129159}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &1537129161
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1537129159}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 5
--- !u!4 &1537129162
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1537129159}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1628453470
GameObject:
m_ObjectHideFlags: 0
@ -920,3 +1062,97 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2107709633
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 2107709637}
- component: {fileID: 2107709636}
- component: {fileID: 2107709635}
- component: {fileID: 2107709634}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &2107709634
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2107709633}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &2107709635
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2107709633}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
--- !u!223 &2107709636
Canvas:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2107709633}
m_Enabled: 1
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 &2107709637
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2107709633}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 394849623}
m_Father: {fileID: 0}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
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}

View File

@ -41,6 +41,8 @@ namespace Spine.Unity.Examples {
int currentHealth = 100;
const int maxHealth = 100;
public UnityEngine.Events.UnityEvent onAttack;
void Update () {
if (Input.GetKeyDown(KeyCode.Space)) {
currentHealth -= 10;
@ -50,6 +52,7 @@ namespace Spine.Unity.Examples {
spineboy.AnimationState.SetAnimation(0, "hit", false);
spineboy.AnimationState.AddAnimation(0, "idle", true, 0);
gauge.fillPercent = (float)currentHealth/(float)maxHealth;
onAttack.Invoke();
} else {
if (currentHealth >= 0) {
gauge.fillPercent = 0;

View File

@ -37,15 +37,15 @@ namespace Spine.Unity.Examples {
[RequireComponent(typeof(CharacterController))]
public class BasicPlatformerController : MonoBehaviour {
[Header("Controls")]
[Header("Controls")]
public string XAxis = "Horizontal";
public string YAxis = "Vertical";
public string JumpButton = "Jump";
[Header("Moving")]
public float walkSpeed = 4;
public float runSpeed = 10;
public float gravity = 65;
public float walkSpeed = 1.5f;
public float runSpeed = 7f;
public float gravityScale = 6.6f;
[Header("Jumping")]
public float jumpSpeed = 25;
@ -55,7 +55,6 @@ namespace Spine.Unity.Examples {
public float forceCrouchDuration = 0.5f;
[Header("Graphics")]
public Transform graphicsRoot;
public SkeletonAnimation skeletonAnimation;
[Header("Animation")]
@ -72,32 +71,30 @@ namespace Spine.Unity.Examples {
[SpineAnimation(dataField: "skeletonAnimation")]
public string crouchName = "Crouch";
[Header("Audio")]
[Header("Effects")]
public AudioSource jumpAudioSource;
public AudioSource hardfallAudioSource;
public AudioSource footstepAudioSource;
public ParticleSystem landParticles;
[SpineEvent]
public string footstepEventName = "Footstep";
CharacterController controller;
Vector2 velocity = Vector2.zero;
Vector2 lastVelocity = Vector2.zero;
bool lastGrounded = false;
Vector3 velocity = default(Vector3);
float jumpEndTime = 0;
bool jumpInterrupt = false;
float forceCrouchEndTime;
Quaternion flippedRotation = Quaternion.Euler(0, 180, 0);
Vector2 input;
bool wasGrounded = false;
void Awake () {
controller = GetComponent<CharacterController>();
}
void Start () {
// Register a callback for Spine Events (in this case, Footstep)
skeletonAnimation.AnimationState.Event += HandleEvent;
}
void HandleEvent (Spine.TrackEntry trackEntry, Spine.Event e) {
// Play some sound if footstep event fired
if (e.Data.Name == footstepEventName) {
footstepAudioSource.Stop();
footstepAudioSource.pitch = GetRandomPitch(0.2f);
@ -105,100 +102,85 @@ namespace Spine.Unity.Examples {
}
}
void Update () {
//control inputs
float x = Input.GetAxis(XAxis);
float y = Input.GetAxis(YAxis);
//check for force crouch
bool crouching = (controller.isGrounded && y < -0.5f) || (forceCrouchEndTime > Time.time);
velocity.x = 0;
static float GetRandomPitch (float maxOffset) {
return 1f + Random.Range(-maxOffset, maxOffset);
}
void Update () {
input.x = Input.GetAxis(XAxis);
input.y = Input.GetAxis(YAxis);
bool crouching = (controller.isGrounded && input.y < -0.5f) || (forceCrouchEndTime > Time.time);
velocity.x = 0;
float dt = Time.deltaTime;
//Calculate control velocity
if (!crouching) {
if (Input.GetButtonDown(JumpButton) && controller.isGrounded) {
//jump
if (Input.GetButtonDown(JumpButton) && controller.isGrounded) {
jumpAudioSource.Stop();
jumpAudioSource.Play();
velocity.y = jumpSpeed;
jumpEndTime = Time.time + jumpDuration;
} else if (Time.time < jumpEndTime && Input.GetButtonUp(JumpButton)) {
jumpInterrupt = true;
} else {
jumpInterrupt |= Time.time < jumpEndTime && Input.GetButtonUp(JumpButton);
}
if (x != 0) {
//walk or run
velocity.x = Mathf.Abs(x) > 0.6f ? runSpeed : walkSpeed;
velocity.x *= Mathf.Sign(x);
if (input.x != 0) {
velocity.x = Mathf.Abs(input.x) > 0.6f ? runSpeed : walkSpeed;
velocity.x *= Mathf.Sign(input.x);
}
if (jumpInterrupt) {
//interrupt jump and smoothly cut Y velocity
if (velocity.y > 0) {
velocity.y = Mathf.MoveTowards(velocity.y, 0, Time.deltaTime * 100);
velocity.y = Mathf.MoveTowards(velocity.y, 0, dt * jumpInterruptFactor);
} else {
jumpInterrupt = false;
}
}
}
//apply gravity F = mA (Learn it, love it, live it)
velocity.y -= gravity * Time.deltaTime;
var gravityDeltaVelocity = Physics.gravity * gravityScale * dt;
//move
controller.Move(new Vector3(velocity.x, velocity.y, 0) * Time.deltaTime);
if (controller.isGrounded) {
//cancel out Y velocity if on ground
velocity.y = -gravity * Time.deltaTime;
jumpInterrupt = false;
} else {
if (wasGrounded) {
if (velocity.y < 0)
velocity.y = 0;
} else {
velocity += gravityDeltaVelocity;
}
}
Vector2 deltaVelocity = lastVelocity - velocity;
wasGrounded = controller.isGrounded;
if (!lastGrounded && controller.isGrounded) {
//detect hard fall
if ((gravity * Time.deltaTime) - deltaVelocity.y > forceCrouchVelocity) {
controller.Move(velocity * dt);
if (!wasGrounded && controller.isGrounded) {
if (-velocity.y > forceCrouchVelocity) {
forceCrouchEndTime = Time.time + forceCrouchDuration;
hardfallAudioSource.Play();
} else {
//play footstep audio if light fall because why not
footstepAudioSource.Play();
}
landParticles.Emit((int)(velocity.y / -9f) + 2);
}
//graphics updates
if (controller.isGrounded) {
if (crouching) { //crouch
if (crouching) {
skeletonAnimation.AnimationName = crouchName;
} else {
if (x == 0) //idle
if (input.x == 0)
skeletonAnimation.AnimationName = idleName;
else //move
skeletonAnimation.AnimationName = Mathf.Abs(x) > 0.6f ? runName : walkName;
else
skeletonAnimation.AnimationName = Mathf.Abs(input.x) > 0.6f ? runName : walkName;
}
} else {
if (velocity.y > 0) //jump
skeletonAnimation.AnimationName = jumpName;
else //fall
skeletonAnimation.AnimationName = fallName;
skeletonAnimation.AnimationName = velocity.y > 0 ? jumpName : fallName;
}
//flip left or right
if (x > 0)
graphicsRoot.localRotation = Quaternion.identity;
else if (x < 0)
graphicsRoot.localRotation = flippedRotation;
//store previous state
lastVelocity = velocity;
lastGrounded = controller.isGrounded;
}
if (input.x != 0)
skeletonAnimation.Skeleton.FlipX = input.x < 0;
static float GetRandomPitch (float maxOffset) {
return 1f + Random.Range(-maxOffset, maxOffset);
}
}
}

View File

@ -1,85 +1,85 @@
/******************************************************************************
* 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.
*****************************************************************************/
using UnityEngine;
using System.Collections;
using Spine.Unity;
namespace Spine.Unity.Examples {
public class Raptor : MonoBehaviour {
#region Inspector
[SpineAnimation]
public string walk = "walk";
[SpineAnimation]
public string gungrab = "gungrab";
[SpineAnimation]
public string gunkeep = "gunkeep";
[SpineEvent]
public string footstepEvent = "footstep";
public AudioSource footstepAudioSource;
#endregion
SkeletonAnimation skeletonAnimation;
void Start () {
skeletonAnimation = GetComponent<SkeletonAnimation>();
skeletonAnimation.state.Event += HandleEvent;
StartCoroutine(GunGrabRoutine());
}
void HandleEvent (Spine.TrackEntry trackEntry, Spine.Event e) {
if (e.Data.Name == footstepEvent) {
footstepAudioSource.pitch = 0.5f + Random.Range(-0.2f, 0.2f);
footstepAudioSource.Play();
}
}
IEnumerator GunGrabRoutine () {
// Play the walk animation on track 0.
skeletonAnimation.state.SetAnimation(0, walk, true);
// Repeatedly play the gungrab and gunkeep animation on track 1.
while (true) {
yield return new WaitForSeconds(Random.Range(0.5f, 3f));
skeletonAnimation.state.SetAnimation(1, gungrab, false);
yield return new WaitForSeconds(Random.Range(0.5f, 3f));
skeletonAnimation.state.SetAnimation(1, gunkeep, false);
}
}
}
/******************************************************************************
* 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.
*****************************************************************************/
using UnityEngine;
using System.Collections;
using Spine.Unity;
namespace Spine.Unity.Examples {
public class Raptor : MonoBehaviour {
#region Inspector
[SpineAnimation]
public string walk = "walk";
[SpineAnimation]
public string gungrab = "gungrab";
[SpineAnimation]
public string gunkeep = "gunkeep";
[SpineEvent]
public string footstepEvent = "footstep";
public AudioSource footstepAudioSource;
#endregion
SkeletonAnimation skeletonAnimation;
void Start () {
skeletonAnimation = GetComponent<SkeletonAnimation>();
skeletonAnimation.AnimationState.Event += HandleEvent;
StartCoroutine(GunGrabRoutine());
}
void HandleEvent (Spine.TrackEntry trackEntry, Spine.Event e) {
if (e.Data.Name == footstepEvent) {
footstepAudioSource.pitch = 0.5f + Random.Range(-0.2f, 0.2f);
footstepAudioSource.Play();
}
}
IEnumerator GunGrabRoutine () {
// Play the walk animation on track 0.
skeletonAnimation.AnimationState.SetAnimation(0, walk, true);
// Repeatedly play the gungrab and gunkeep animation on track 1.
while (true) {
yield return new WaitForSeconds(Random.Range(0.5f, 3f));
skeletonAnimation.AnimationState.SetAnimation(1, gungrab, false);
yield return new WaitForSeconds(Random.Range(0.5f, 3f));
skeletonAnimation.AnimationState.SetAnimation(1, gunkeep, false);
}
}
}
}

View File

@ -1,103 +1,108 @@
/******************************************************************************
* 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.
*****************************************************************************/
using UnityEngine;
using System.Collections;
using Spine.Unity;
namespace Spine.Unity.Examples {
public class SpineBeginnerTwo : MonoBehaviour {
#region Inspector
// [SpineAnimation] attribute allows an Inspector dropdown of Spine animation names coming form SkeletonAnimation.
[SpineAnimation]
public string runAnimationName;
[SpineAnimation]
public string idleAnimationName;
[SpineAnimation]
public string walkAnimationName;
[SpineAnimation]
public string shootAnimationName;
#endregion
SkeletonAnimation skeletonAnimation;
// Spine.AnimationState and Spine.Skeleton are not Unity-serialized objects. You will not see them as fields in the inspector.
public Spine.AnimationState spineAnimationState;
public Spine.Skeleton skeleton;
void Start () {
// Make sure you get these AnimationState and Skeleton references in Start or Later. Getting and using them in Awake is not guaranteed by default execution order.
skeletonAnimation = GetComponent<SkeletonAnimation>();
spineAnimationState = skeletonAnimation.AnimationState;
skeleton = skeletonAnimation.Skeleton;
StartCoroutine(DoDemoRoutine());
}
/// <summary>This is an infinitely repeating Unity Coroutine. Read the Unity documentation on Coroutines to learn more.</summary>
IEnumerator DoDemoRoutine () {
while (true) {
// SetAnimation is the basic way to set an animation.
// SetAnimation sets the animation and starts playing it from the beginning.
// Common Mistake: If you keep calling it in Update, it will keep showing the first pose of the animation, do don't do that.
spineAnimationState.SetAnimation(0, walkAnimationName, true);
yield return new WaitForSeconds(1.5f);
// skeletonAnimation.AnimationName = runAnimationName; // this line also works for quick testing/simple uses.
spineAnimationState.SetAnimation(0, runAnimationName, true);
yield return new WaitForSeconds(1.5f);
spineAnimationState.SetAnimation(0, idleAnimationName, true);
yield return new WaitForSeconds(1f);
skeleton.FlipX = true; // skeleton allows you to flip the skeleton.
yield return new WaitForSeconds(0.5f);
skeleton.FlipX = false;
yield return new WaitForSeconds(0.5f);
}
}
void Track_Complete (TrackEntry trackEntry) { Debug.Log("Complete " + trackEntry.Animation.Name); }
void Track_End (TrackEntry trackEntry) { Debug.Log("End " + trackEntry.Animation.Name); }
void HandleStart (TrackEntry trackEntry) { Debug.Log("Start " + trackEntry.Animation.Name); }
}
}
/******************************************************************************
* 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.
*****************************************************************************/
using UnityEngine;
using System.Collections;
using Spine.Unity;
namespace Spine.Unity.Examples {
public class SpineBeginnerTwo : MonoBehaviour {
#region Inspector
// [SpineAnimation] attribute allows an Inspector dropdown of Spine animation names coming form SkeletonAnimation.
[SpineAnimation]
public string runAnimationName;
[SpineAnimation]
public string idleAnimationName;
[SpineAnimation]
public string walkAnimationName;
[SpineAnimation]
public string shootAnimationName;
[Header("Transitions")]
[SpineAnimation]
public string idleTurnAnimationName;
[SpineAnimation]
public string runToIdleAnimationName;
#endregion
SkeletonAnimation skeletonAnimation;
// Spine.AnimationState and Spine.Skeleton are not Unity-serialized objects. You will not see them as fields in the inspector.
public Spine.AnimationState spineAnimationState;
public Spine.Skeleton skeleton;
void Start () {
// Make sure you get these AnimationState and Skeleton references in Start or Later.
// Getting and using them in Awake is not guaranteed by default execution order.
skeletonAnimation = GetComponent<SkeletonAnimation>();
spineAnimationState = skeletonAnimation.AnimationState;
skeleton = skeletonAnimation.Skeleton;
StartCoroutine(DoDemoRoutine());
}
/// This is an infinitely repeating Unity Coroutine. Read the Unity documentation on Coroutines to learn more.
IEnumerator DoDemoRoutine () {
while (true) {
// SetAnimation is the basic way to set an animation.
// SetAnimation sets the animation and starts playing it from the beginning.
// Common Mistake: If you keep calling it in Update, it will keep showing the first pose of the animation, do don't do that.
spineAnimationState.SetAnimation(0, walkAnimationName, true);
yield return new WaitForSeconds(1.5f);
spineAnimationState.SetAnimation(0, runAnimationName, true);
yield return new WaitForSeconds(1.5f);
// AddAnimation queues up an animation to play after the previous one ends.
spineAnimationState.SetAnimation(0, runToIdleAnimationName, false);
spineAnimationState.AddAnimation(0, idleAnimationName, true, 0);
yield return new WaitForSeconds(1f);
skeleton.FlipX = true; // skeleton allows you to flip the skeleton.
spineAnimationState.SetAnimation(0, idleTurnAnimationName, false);
spineAnimationState.AddAnimation(0, idleAnimationName, true, 0);
yield return new WaitForSeconds(0.5f);
skeleton.FlipX = false;
spineAnimationState.SetAnimation(0, idleTurnAnimationName, false);
spineAnimationState.AddAnimation(0, idleAnimationName, true, 0);
yield return new WaitForSeconds(0.5f);
}
}
}
}

View File

@ -1,53 +1,53 @@
/******************************************************************************
* 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.
*****************************************************************************/
using UnityEngine;
using System.Collections;
using Spine.Unity;
namespace Spine.Unity.Examples {
public class SpineBlinkPlayer : MonoBehaviour {
const int BlinkTrack = 1;
[SpineAnimation]
public string blinkAnimation;
public float minimumDelay = 0.15f;
public float maximumDelay = 3f;
IEnumerator Start () {
var skeletonAnimation = GetComponent<SkeletonAnimation>(); if (skeletonAnimation == null) yield break;
while (true) {
skeletonAnimation.AnimationState.SetAnimation(SpineBlinkPlayer.BlinkTrack, blinkAnimation, false);
yield return new WaitForSeconds(Random.Range(minimumDelay, maximumDelay));
}
}
}
}
/******************************************************************************
* 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.
*****************************************************************************/
using UnityEngine;
using System.Collections;
using Spine.Unity;
namespace Spine.Unity.Examples {
public class SpineBlinkPlayer : MonoBehaviour {
const int BlinkTrack = 1;
[SpineAnimation]
public string blinkAnimation;
public float minimumDelay = 0.15f;
public float maximumDelay = 3f;
IEnumerator Start () {
var skeletonAnimation = GetComponent<SkeletonAnimation>(); if (skeletonAnimation == null) yield break;
while (true) {
skeletonAnimation.AnimationState.SetAnimation(SpineBlinkPlayer.BlinkTrack, blinkAnimation, false);
yield return new WaitForSeconds(Random.Range(minimumDelay, maximumDelay));
}
}
}
}

View File

@ -1,63 +1,63 @@
/******************************************************************************
* 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.
*****************************************************************************/
using UnityEngine;
using System.Collections;
namespace Spine.Unity.Examples {
public class SpineboyBeginnerInput : MonoBehaviour {
#region Inspector
public string horizontalAxis = "Horizontal";
public string attackButton = "Fire1";
public string jumpButton = "Jump";
public SpineboyBeginnerModel model;
void OnValidate () {
if (model == null)
model = GetComponent<SpineboyBeginnerModel>();
}
#endregion
void Update () {
if (model == null) return;
float currentHorizontal = Input.GetAxisRaw(horizontalAxis);
model.TryMove(currentHorizontal);
if (Input.GetButton(attackButton))
model.TryShoot();
if (Input.GetButtonDown(jumpButton))
model.TryJump();
}
}
}
/******************************************************************************
* 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.
*****************************************************************************/
using UnityEngine;
using System.Collections;
namespace Spine.Unity.Examples {
public class SpineboyBeginnerInput : MonoBehaviour {
#region Inspector
public string horizontalAxis = "Horizontal";
public string attackButton = "Fire1";
public string jumpButton = "Jump";
public SpineboyBeginnerModel model;
void OnValidate () {
if (model == null)
model = GetComponent<SpineboyBeginnerModel>();
}
#endregion
void Update () {
if (model == null) return;
float currentHorizontal = Input.GetAxisRaw(horizontalAxis);
model.TryMove(currentHorizontal);
if (Input.GetButton(attackButton))
model.TryShoot();
if (Input.GetButtonDown(jumpButton))
model.TryJump();
}
}
}

View File

@ -1,115 +1,115 @@
/******************************************************************************
* 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.
*****************************************************************************/
using UnityEngine;
using System.Collections;
namespace Spine.Unity.Examples {
[SelectionBase]
public class SpineboyBeginnerModel : MonoBehaviour {
#region Inspector
[Header("Current State")]
public SpineBeginnerBodyState state;
public bool facingLeft;
[Range(-1f, 1f)]
public float currentSpeed;
[Header("Balance")]
public float shootInterval = 0.12f;
#endregion
float lastShootTime;
public event System.Action ShootEvent; // Lets other scripts know when Spineboy is shooting. Check C# Documentation to learn more about events and delegates.
#region API
public void TryJump () {
StartCoroutine(JumpRoutine());
}
public void TryShoot () {
float currentTime = Time.time;
if (currentTime - lastShootTime > shootInterval) {
lastShootTime = currentTime;
if (ShootEvent != null) ShootEvent(); // Fire the "ShootEvent" event.
}
}
public void TryMove (float speed) {
currentSpeed = speed; // show the "speed" in the Inspector.
if (speed != 0) {
bool speedIsNegative = (speed < 0f);
facingLeft = speedIsNegative; // Change facing direction whenever speed is not 0.
}
if (state != SpineBeginnerBodyState.Jumping) {
state = (speed == 0) ? SpineBeginnerBodyState.Idle : SpineBeginnerBodyState.Running;
}
}
#endregion
IEnumerator JumpRoutine () {
if (state == SpineBeginnerBodyState.Jumping) yield break; // Don't jump when already jumping.
state = SpineBeginnerBodyState.Jumping;
// Fake jumping.
{
var pos = transform.localPosition;
const float jumpTime = 1.2f;
const float half = jumpTime * 0.5f;
const float jumpPower = 20f;
for (float t = 0; t < half; t += Time.deltaTime) {
float d = jumpPower * (half - t);
transform.Translate((d * Time.deltaTime) * Vector3.up);
yield return null;
}
for (float t = 0; t < half; t += Time.deltaTime) {
float d = jumpPower * t;
transform.Translate((d * Time.deltaTime) * Vector3.down);
yield return null;
}
transform.localPosition = pos;
}
state = SpineBeginnerBodyState.Idle;
}
}
public enum SpineBeginnerBodyState {
Idle,
Running,
Jumping
}
}
/******************************************************************************
* 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.
*****************************************************************************/
using UnityEngine;
using System.Collections;
namespace Spine.Unity.Examples {
[SelectionBase]
public class SpineboyBeginnerModel : MonoBehaviour {
#region Inspector
[Header("Current State")]
public SpineBeginnerBodyState state;
public bool facingLeft;
[Range(-1f, 1f)]
public float currentSpeed;
[Header("Balance")]
public float shootInterval = 0.12f;
#endregion
float lastShootTime;
public event System.Action ShootEvent; // Lets other scripts know when Spineboy is shooting. Check C# Documentation to learn more about events and delegates.
#region API
public void TryJump () {
StartCoroutine(JumpRoutine());
}
public void TryShoot () {
float currentTime = Time.time;
if (currentTime - lastShootTime > shootInterval) {
lastShootTime = currentTime;
if (ShootEvent != null) ShootEvent(); // Fire the "ShootEvent" event.
}
}
public void TryMove (float speed) {
currentSpeed = speed; // show the "speed" in the Inspector.
if (speed != 0) {
bool speedIsNegative = (speed < 0f);
facingLeft = speedIsNegative; // Change facing direction whenever speed is not 0.
}
if (state != SpineBeginnerBodyState.Jumping) {
state = (speed == 0) ? SpineBeginnerBodyState.Idle : SpineBeginnerBodyState.Running;
}
}
#endregion
IEnumerator JumpRoutine () {
if (state == SpineBeginnerBodyState.Jumping) yield break; // Don't jump when already jumping.
state = SpineBeginnerBodyState.Jumping;
// Fake jumping.
{
var pos = transform.localPosition;
const float jumpTime = 1.2f;
const float half = jumpTime * 0.5f;
const float jumpPower = 20f;
for (float t = 0; t < half; t += Time.deltaTime) {
float d = jumpPower * (half - t);
transform.Translate((d * Time.deltaTime) * Vector3.up);
yield return null;
}
for (float t = 0; t < half; t += Time.deltaTime) {
float d = jumpPower * t;
transform.Translate((d * Time.deltaTime) * Vector3.down);
yield return null;
}
transform.localPosition = pos;
}
state = SpineBeginnerBodyState.Idle;
}
}
public enum SpineBeginnerBodyState {
Idle,
Running,
Jumping
}
}

View File

@ -1,149 +1,149 @@
/******************************************************************************
* 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.
*****************************************************************************/
using UnityEngine;
using System.Collections;
using Spine.Unity;
namespace Spine.Unity.Examples {
public class SpineboyBeginnerView : MonoBehaviour {
#region Inspector
[Header("Components")]
public SpineboyBeginnerModel model;
public SkeletonAnimation skeletonAnimation;
[SpineAnimation] public string run, idle, shoot, jump;
[SpineEvent] public string footstepEventName;
[Header("Audio")]
public float footstepPitchOffset = 0.2f;
public float gunsoundPitchOffset = 0.13f;
public AudioSource footstepSource, gunSource, jumpSource;
[Header("Effects")]
public ParticleSystem gunParticles;
#endregion
SpineBeginnerBodyState previousViewState;
void Start () {
if (skeletonAnimation == null) return;
model.ShootEvent += PlayShoot;
skeletonAnimation.AnimationState.Event += HandleEvent;
}
void HandleEvent (Spine.TrackEntry trackEntry, Spine.Event e) {
if (e.Data.Name == footstepEventName)
PlayFootstepSound();
}
void Update () {
if (skeletonAnimation == null) return;
if (model == null) return;
if (skeletonAnimation.skeleton.FlipX != model.facingLeft) { // Detect changes in model.facingLeft
Turn(model.facingLeft);
}
// Detect changes in model.state
var currentModelState = model.state;
if (previousViewState != currentModelState) {
PlayNewStableAnimation();
}
previousViewState = currentModelState;
}
void PlayNewStableAnimation () {
var newModelState = model.state;
string nextAnimation;
// Add conditionals to not interrupt transient animations.
if (previousViewState == SpineBeginnerBodyState.Jumping && newModelState != SpineBeginnerBodyState.Jumping) {
PlayFootstepSound();
}
if (newModelState == SpineBeginnerBodyState.Jumping) {
jumpSource.Play();
nextAnimation = jump;
} else {
if (newModelState == SpineBeginnerBodyState.Running) {
nextAnimation = run;
} else {
nextAnimation = idle;
}
}
skeletonAnimation.AnimationState.SetAnimation(0, nextAnimation, true);
}
void PlayFootstepSound () {
footstepSource.Play();
footstepSource.pitch = GetRandomPitch(footstepPitchOffset);
}
[ContextMenu("Check Tracks")]
void CheckTracks () {
var state = skeletonAnimation.AnimationState;
Debug.Log(state.GetCurrent(0));
Debug.Log(state.GetCurrent(1));
}
#region Transient Actions
public void PlayShoot () {
// Play the shoot animation on track 1.
var track = skeletonAnimation.AnimationState.SetAnimation(1, shoot, false);
track.AttachmentThreshold = 1f;
track.MixDuration = 0f;
var empty = skeletonAnimation.state.AddEmptyAnimation(1, 0.5f, 0.1f);
empty.AttachmentThreshold = 1f;
gunSource.pitch = GetRandomPitch(gunsoundPitchOffset);
gunSource.Play();
//gunParticles.randomSeed = (uint)Random.Range(0, 100);
gunParticles.Play();
}
public void Turn (bool facingLeft) {
skeletonAnimation.Skeleton.FlipX = facingLeft;
// Maybe play a transient turning animation too, then call ChangeStableAnimation.
}
#endregion
#region Utility
public float GetRandomPitch (float maxPitchOffset) {
return 1f + Random.Range(-maxPitchOffset, maxPitchOffset);
}
#endregion
}
}
/******************************************************************************
* 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.
*****************************************************************************/
using UnityEngine;
using System.Collections;
using Spine.Unity;
namespace Spine.Unity.Examples {
public class SpineboyBeginnerView : MonoBehaviour {
#region Inspector
[Header("Components")]
public SpineboyBeginnerModel model;
public SkeletonAnimation skeletonAnimation;
[SpineAnimation] public string run, idle, shoot, jump;
[SpineEvent] public string footstepEventName;
[Header("Audio")]
public float footstepPitchOffset = 0.2f;
public float gunsoundPitchOffset = 0.13f;
public AudioSource footstepSource, gunSource, jumpSource;
[Header("Effects")]
public ParticleSystem gunParticles;
#endregion
SpineBeginnerBodyState previousViewState;
void Start () {
if (skeletonAnimation == null) return;
model.ShootEvent += PlayShoot;
skeletonAnimation.AnimationState.Event += HandleEvent;
}
void HandleEvent (Spine.TrackEntry trackEntry, Spine.Event e) {
if (e.Data.Name == footstepEventName)
PlayFootstepSound();
}
void Update () {
if (skeletonAnimation == null) return;
if (model == null) return;
if (skeletonAnimation.skeleton.FlipX != model.facingLeft) { // Detect changes in model.facingLeft
Turn(model.facingLeft);
}
// Detect changes in model.state
var currentModelState = model.state;
if (previousViewState != currentModelState) {
PlayNewStableAnimation();
}
previousViewState = currentModelState;
}
void PlayNewStableAnimation () {
var newModelState = model.state;
string nextAnimation;
// Add conditionals to not interrupt transient animations.
if (previousViewState == SpineBeginnerBodyState.Jumping && newModelState != SpineBeginnerBodyState.Jumping) {
PlayFootstepSound();
}
if (newModelState == SpineBeginnerBodyState.Jumping) {
jumpSource.Play();
nextAnimation = jump;
} else {
if (newModelState == SpineBeginnerBodyState.Running) {
nextAnimation = run;
} else {
nextAnimation = idle;
}
}
skeletonAnimation.AnimationState.SetAnimation(0, nextAnimation, true);
}
void PlayFootstepSound () {
footstepSource.Play();
footstepSource.pitch = GetRandomPitch(footstepPitchOffset);
}
[ContextMenu("Check Tracks")]
void CheckTracks () {
var state = skeletonAnimation.AnimationState;
Debug.Log(state.GetCurrent(0));
Debug.Log(state.GetCurrent(1));
}
#region Transient Actions
public void PlayShoot () {
// Play the shoot animation on track 1.
var track = skeletonAnimation.AnimationState.SetAnimation(1, shoot, false);
track.AttachmentThreshold = 1f;
track.MixDuration = 0f;
var empty = skeletonAnimation.state.AddEmptyAnimation(1, 0.5f, 0.1f);
empty.AttachmentThreshold = 1f;
gunSource.pitch = GetRandomPitch(gunsoundPitchOffset);
gunSource.Play();
//gunParticles.randomSeed = (uint)Random.Range(0, 100);
gunParticles.Play();
}
public void Turn (bool facingLeft) {
skeletonAnimation.Skeleton.FlipX = facingLeft;
// Maybe play a transient turning animation too, then call ChangeStableAnimation.
}
#endregion
#region Utility
public float GetRandomPitch (float maxPitchOffset) {
return 1f + Random.Range(-maxPitchOffset, maxPitchOffset);
}
#endregion
}
}

View File

@ -0,0 +1,48 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HurtFlashEffect : MonoBehaviour {
const int DefaultFlashCount = 3;
public int flashCount = DefaultFlashCount;
public Color flashColor = Color.white;
[Range(1f/120f, 1f/15f)]
public float interval = 1f/60f;
public string fillPhaseProperty = "_FillPhase";
public string fillColorProperty = "_FillColor";
MaterialPropertyBlock mpb;
MeshRenderer meshRenderer;
public void Flash () {
if (mpb == null) mpb = new MaterialPropertyBlock();
if (meshRenderer == null) meshRenderer = GetComponent<MeshRenderer>();
meshRenderer.GetPropertyBlock(mpb);
StartCoroutine(FlashRoutine());
}
IEnumerator FlashRoutine () {
if (flashCount < 0) flashCount = DefaultFlashCount;
int fillPhase = Shader.PropertyToID(fillPhaseProperty);
int fillColor = Shader.PropertyToID(fillColorProperty);
var wait = new WaitForSeconds(interval);
for (int i = 0; i < flashCount; i++) {
mpb.SetColor(fillColor, flashColor);
mpb.SetFloat(fillPhase, 1f);
meshRenderer.SetPropertyBlock(mpb);
yield return wait;
mpb.SetFloat(fillPhase, 0f);
meshRenderer.SetPropertyBlock(mpb);
yield return wait;
}
yield return null;
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 395f769061839bf488f157c37d23835d
timeCreated: 1497416645
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,292 +1,292 @@
dragon.png
size: 1017,1022
size: 1024,1024
format: RGBA8888
filter: Linear,Linear
repeat: none
L_rear_thigh
rotate: false
xy: 895, 20
size: 91, 148
orig: 91, 149
offset: 0, 0
index: -1
L_wing01
rotate: false
xy: 814, 672
size: 191, 256
orig: 191, 256
offset: 0, 0
index: -1
L_wing02
rotate: false
xy: 714, 189
size: 179, 269
orig: 179, 269
offset: 0, 0
index: -1
L_wing03
rotate: false
xy: 785, 463
size: 186, 207
orig: 186, 207
offset: 0, 0
index: -1
L_wing05
chin
rotate: true
xy: 2, 9
size: 218, 213
orig: 218, 213
xy: 856, 140
size: 214, 146
orig: 214, 146
offset: 0, 0
index: -1
L_wing06
rotate: false
xy: 2, 229
size: 192, 331
orig: 192, 331
offset: 0, 0
index: -1
R_wing01
front-toe-a
rotate: true
xy: 502, 709
size: 219, 310
orig: 219, 310
offset: 0, 0
index: -1
R_wing02
rotate: true
xy: 204, 463
size: 203, 305
orig: 203, 305
offset: 0, 0
index: -1
R_wing03
rotate: false
xy: 511, 460
size: 272, 247
orig: 272, 247
offset: 0, 0
index: -1
R_wing05
rotate: false
xy: 196, 232
size: 251, 229
orig: 251, 229
offset: 0, 0
index: -1
R_wing06
rotate: false
xy: 2, 562
size: 200, 366
orig: 200, 366
offset: 0, 0
index: -1
R_wing07
rotate: true
xy: 449, 258
size: 200, 263
orig: 200, 263
offset: 0, 0
index: -1
R_wing08
rotate: false
xy: 467, 2
size: 234, 254
orig: 234, 254
offset: 0, 0
index: -1
R_wing09
rotate: false
xy: 217, 26
size: 248, 204
orig: 248, 204
offset: 0, 0
index: -1
back
rotate: false
xy: 703, 2
size: 190, 185
orig: 190, 185
offset: 0, 0
index: -1
chest
rotate: true
xy: 895, 170
size: 136, 122
orig: 136, 122
offset: 0, 0
index: -1
front_toeA
rotate: false
xy: 976, 972
xy: 584, 74
size: 29, 50
orig: 29, 50
offset: 0, 0
index: -1
head
rotate: false
xy: 204, 668
xy: 204, 758
size: 296, 260
orig: 296, 260
offset: 0, 0
index: -1
logo
left-front-leg
rotate: false
xy: 2, 930
size: 897, 92
orig: 897, 92
xy: 636, 357
size: 84, 57
orig: 84, 57
offset: 0, 0
index: -1
left-rear-thigh
rotate: true
xy: 207, 14
size: 91, 149
orig: 91, 149
offset: 0, 0
index: -1
left-wing01
rotate: false
xy: 443, 105
size: 191, 256
orig: 191, 256
offset: 0, 0
index: -1
left-wing02
rotate: true
xy: 502, 618
size: 179, 269
orig: 179, 269
offset: 0, 0
index: -1
left-wing04
rotate: false
xy: 636, 4
size: 188, 135
orig: 188, 135
offset: 0, 0
index: -1
left-wing05
rotate: false
xy: 636, 141
size: 218, 213
orig: 218, 213
offset: 0, 0
index: -1
left-wing06
rotate: false
xy: 2, 319
size: 192, 331
orig: 192, 331
offset: 0, 0
index: -1
left-wing07
rotate: true
xy: 750, 356
size: 159, 255
orig: 159, 255
offset: 0, 0
index: -1
right-rear-thigh
rotate: true
xy: 433, 12
size: 91, 149
orig: 91, 149
offset: 0, 0
index: -1
right-wing01
rotate: true
xy: 502, 799
size: 219, 310
orig: 219, 310
offset: 0, 0
index: -1
right-wing02
rotate: false
xy: 2, 12
size: 203, 305
orig: 203, 305
offset: 0, 0
index: -1
right-wing03
rotate: false
xy: 196, 363
size: 272, 247
orig: 272, 247
offset: 0, 0
index: -1
right-wing04
rotate: false
xy: 204, 612
size: 279, 144
orig: 279, 144
offset: 0, 0
index: -1
right-wing05
rotate: true
xy: 773, 517
size: 251, 229
orig: 251, 229
offset: 0, 0
index: -1
right-wing06
rotate: false
xy: 2, 652
size: 200, 366
orig: 200, 366
offset: 0, 0
index: -1
right-wing07
rotate: true
xy: 485, 416
size: 200, 263
orig: 200, 263
offset: 0, 0
index: -1
right-wing08
rotate: false
xy: 207, 107
size: 234, 254
orig: 234, 254
offset: 0, 0
index: -1
right-wing09
rotate: true
xy: 814, 770
size: 248, 204
orig: 248, 204
offset: 0, 0
index: -1
tail01
rotate: false
xy: 895, 308
rotate: true
xy: 826, 18
size: 120, 153
orig: 120, 153
offset: 0, 0
index: -1
tail03
rotate: false
xy: 901, 930
xy: 358, 13
size: 73, 92
orig: 73, 92
offset: 0, 0
index: -1
dragon2.png
size: 1020,510
size: 1024,1024
format: RGBA8888
filter: Linear,Linear
repeat: none
L_front_leg
rotate: true
xy: 391, 141
size: 84, 57
orig: 84, 57
offset: 0, 0
index: -1
L_front_thigh
back
rotate: false
xy: 446, 269
size: 84, 72
orig: 84, 72
xy: 190, 800
size: 190, 185
orig: 190, 185
offset: 0, 0
index: -1
L_rear_leg
rotate: true
xy: 888, 342
size: 168, 132
orig: 206, 177
offset: 19, 20
index: -1
L_wing04
chest
rotate: false
xy: 256, 227
size: 188, 135
orig: 188, 135
xy: 382, 863
size: 136, 122
orig: 136, 122
offset: 0, 0
index: -1
L_wing07
front-toe-b
rotate: false
xy: 2, 109
size: 159, 255
orig: 159, 255
offset: 0, 0
index: -1
L_wing08
rotate: true
xy: 705, 346
size: 164, 181
orig: 164, 181
offset: 0, 0
index: -1
L_wing09
rotate: false
xy: 499, 343
size: 204, 167
orig: 204, 167
offset: 0, 0
index: -1
R_front_leg
rotate: false
xy: 273, 34
size: 101, 89
orig: 101, 89
offset: 0, 0
index: -1
R_front_thigh
rotate: false
xy: 163, 106
size: 108, 108
orig: 108, 108
offset: 0, 0
index: -1
R_rear_leg
rotate: false
xy: 273, 125
size: 116, 100
orig: 116, 100
offset: 0, 0
index: -1
R_rear_thigh
rotate: false
xy: 163, 216
size: 91, 148
orig: 91, 149
offset: 0, 0
index: -1
R_wing04
rotate: false
xy: 2, 366
size: 279, 144
orig: 279, 144
offset: 0, 0
index: -1
chin
rotate: false
xy: 283, 364
size: 214, 146
orig: 214, 146
offset: 0, 0
index: -1
front_toeB
rotate: false
xy: 590, 284
xy: 112, 155
size: 56, 57
orig: 56, 57
offset: 0, 0
index: -1
rear-toe
left-front-thigh
rotate: false
xy: 278, 635
size: 84, 72
orig: 84, 72
offset: 0, 0
index: -1
left-rear-leg
rotate: true
xy: 2, 603
size: 206, 177
orig: 206, 177
offset: 0, 0
index: -1
left-wing03
rotate: false
xy: 2, 811
size: 186, 207
orig: 186, 207
offset: 0, 0
index: -1
left-wing08
rotate: false
xy: 2, 214
size: 164, 181
orig: 164, 181
offset: 0, 0
index: -1
left-wing09
rotate: true
xy: 2, 397
size: 204, 167
orig: 204, 167
offset: 0, 0
index: -1
right-front-leg
rotate: false
xy: 278, 709
size: 101, 89
orig: 101, 89
offset: 0, 0
index: -1
right-front-thigh
rotate: false
xy: 2, 104
size: 108, 108
orig: 108, 108
offset: 0, 0
index: -1
right-rear-leg
rotate: false
xy: 2, 2
size: 105, 77
size: 116, 100
orig: 116, 100
offset: 0, 0
index: -1
right-rear-toe
rotate: false
xy: 382, 784
size: 109, 77
orig: 109, 77
offset: 0, 0
index: -1
tail02
rotate: true
xy: 151, 9
rotate: false
xy: 181, 678
size: 95, 120
orig: 95, 120
offset: 0, 0
index: -1
tail04
rotate: false
xy: 532, 270
xy: 381, 711
size: 56, 71
orig: 56, 71
offset: 0, 0
index: -1
tail05
rotate: false
xy: 648, 282
xy: 439, 723
size: 52, 59
orig: 52, 59
offset: 0, 0
index: -1
tail06
rotate: true
xy: 81, 12
rotate: false
xy: 181, 608
size: 95, 68
orig: 95, 68
offset: 0, 0
index: -1
thiagobrayner
rotate: false
xy: 190, 987
size: 350, 31
orig: 350, 31
offset: 0, 0
index: -1

View File

@ -1,44 +1,174 @@
{
"skeleton": { "hash": "wKRjA+djIs9K05d/19sZhwmP3Ow", "spine": "3.6.05-beta", "width": 897, "height": 716.36, "images": "./images/" },
"skeleton": { "hash": "vDJjplNvnyjhUZ09rp3xqyGoiKo", "spine": "3.6.30-beta", "width": 660.39, "height": 604.09, "images": "./images/" },
"bones": [
{ "name": "root", "y": -176.12 },
{ "name": "COG", "parent": "root", "y": 176.12 },
{ "name": "chest", "parent": "COG", "length": 31.24, "rotation": 161.7, "x": 52.53, "y": 15.35 },
{ "name": "L_front_thigh", "parent": "chest", "length": 67.42, "rotation": 138.94, "x": -45.59, "y": 7.93 },
{ "name": "L_front_leg", "parent": "L_front_thigh", "length": 51.58, "rotation": 43.36, "x": 67.42, "y": 0.03 },
{ "name": "L_front_toe1", "parent": "L_front_leg", "length": 51.45, "rotation": -98.01, "x": 45.54, "y": 2.43 },
{ "name": "L_front_toe2", "parent": "L_front_leg", "length": 61.98, "rotation": -55.26, "x": 51.58, "y": -0.13 },
{ "name": "L_front_toe3", "parent": "L_front_leg", "length": 45.65, "rotation": -11.14, "x": 54.19, "y": 0.6, "scaleX": 1.135 },
{ "name": "L_front_toe4", "parent": "L_front_leg", "length": 53.47, "rotation": 19.43, "x": 50.61, "y": 7.09, "scaleX": 1.135 },
{ "name": "back", "parent": "COG", "length": 115.38, "rotation": 151.83, "x": 16.04, "y": 27.94 },
{ "name": "R_rear_thigh", "parent": "back", "length": 123.47, "rotation": 104.88, "x": 65.31, "y": 59.89 },
{ "name": "L_rear_thigh", "parent": "R_rear_thigh", "length": 88.06, "rotation": 28.35, "x": -8.59, "y": 30.19 },
{ "name": "L_rear_leg", "parent": "L_rear_thigh", "length": 103.74, "rotation": -122.41, "x": 96.04, "y": -0.97 },
{ "name": "L_wing", "parent": "chest", "length": 301.12, "rotation": -75.51, "x": -7.25, "y": -24.66 },
{ "name": "R_front_thigh", "parent": "chest", "length": 81.64, "rotation": 67.97, "x": -10.89, "y": 28.25 },
{ "name": "R_front_leg", "parent": "R_front_thigh", "length": 66.53, "rotation": 92.7, "x": 83.05, "y": -0.31 },
{ "name": "R_front_toe1", "parent": "R_front_leg", "length": 46.66, "rotation": 8.59, "x": 70.03, "y": 5.31 },
{ "name": "R_front_toe2", "parent": "R_front_leg", "length": 53.67, "rotation": -35.02, "x": 66.53, "y": 0.34 },
{ "name": "R_front_toe3", "parent": "R_front_leg", "length": 58.39, "rotation": -74.67, "x": 62.1, "y": -0.79 },
{ "name": "R_rear_leg", "parent": "R_rear_thigh", "length": 91.06, "rotation": -129.04, "x": 123.47, "y": -0.27 },
{ "name": "R_rear_toe1", "parent": "R_rear_leg", "length": 95, "rotation": 141.98, "x": 90.07, "y": 2.12 },
{ "name": "R_rear_toe2", "parent": "R_rear_leg", "length": 99.29, "rotation": 125.32, "x": 89.6, "y": 1.52 },
{ "name": "R_rear_toe3", "parent": "R_rear_leg", "length": 103.46, "rotation": 112.27, "x": 91.06, "y": -0.35 },
{ "name": "neck", "parent": "COG", "length": 41.37, "rotation": 39.06, "x": 64.76, "y": 11.98 },
{ "name": "head", "parent": "neck", "length": 188.84, "rotation": 8.07, "x": 69.96, "y": 2.5 },
{ "name": "R_wing", "parent": "head", "length": 359.5, "rotation": 83.21, "x": -74.68, "y": 20.91 },
{ "name": "chin", "parent": "neck", "length": 153.16, "rotation": -69.07, "x": 64.63, "y": -6.99 },
{ "name": "tail1", "parent": "back", "length": 65.65, "rotation": 44.32, "x": 115.38, "y": -0.2 },
{ "name": "tail2", "parent": "tail1", "length": 54.5, "rotation": 12, "x": 65.65, "y": 0.23 },
{ "name": "tail3", "parent": "tail2", "length": 41.78, "rotation": 1.8, "x": 54.5, "y": 0.37 },
{ "name": "tail4", "parent": "tail3", "length": 34.19, "rotation": -1.8, "x": 41.78, "y": 0.16 },
{ "name": "tail5", "parent": "tail4", "length": 32.33, "rotation": -3.15, "x": 34.19, "y": -0.19 },
{ "name": "tail6", "parent": "tail5", "length": 80.08, "rotation": -29.55, "x": 32.33, "y": -0.23 }
{ "name": "center", "parent": "root", "y": 176.12, "color": "ffe300ff" },
{ "name": "back", "parent": "center", "length": 115.38, "rotation": 151.83, "x": 16.04, "y": 27.94, "color": "ffe400ff" },
{ "name": "chest", "parent": "center", "length": 31.24, "rotation": 161.7, "x": 52.53, "y": 15.35, "color": "ffe400ff" },
{ "name": "neck", "parent": "center", "length": 41.37, "rotation": 39.06, "x": 64.76, "y": 11.98, "color": "ffe400ff" },
{ "name": "chin", "parent": "neck", "length": 153.16, "rotation": -69.07, "x": 64.63, "y": -6.99, "color": "ffe400ff" },
{ "name": "head", "parent": "neck", "length": 188.84, "rotation": 8.07, "x": 69.96, "y": 2.5, "color": "ffe400ff" },
{ "name": "left-front-thigh", "parent": "chest", "length": 67.42, "rotation": 138.94, "x": -45.59, "y": 7.93, "color": "ff0000ff" },
{
"name": "left-front-leg",
"parent": "left-front-thigh",
"length": 51.58,
"rotation": 43.36,
"x": 67.42,
"y": 0.03,
"color": "ff0000ff"
},
{
"name": "left-front-toe1",
"parent": "left-front-leg",
"length": 51.45,
"rotation": -98.01,
"x": 45.54,
"y": 2.43,
"color": "ff0000ff"
},
{
"name": "left-front-toe2",
"parent": "left-front-leg",
"length": 61.98,
"rotation": -55.26,
"x": 51.58,
"y": -0.13,
"color": "ff0000ff"
},
{
"name": "left-front-toe3",
"parent": "left-front-leg",
"length": 45.65,
"rotation": -11.14,
"x": 54.19,
"y": 0.6,
"scaleX": 1.135,
"color": "ff0000ff"
},
{
"name": "left-front-toe4",
"parent": "left-front-leg",
"length": 53.47,
"rotation": 19.43,
"x": 50.61,
"y": 7.09,
"scaleX": 1.135,
"color": "ff0000ff"
},
{ "name": "right-rear-thigh", "parent": "back", "length": 123.47, "rotation": 104.88, "x": 65.31, "y": 59.89, "color": "29ff00ff" },
{
"name": "left-rear-thigh",
"parent": "right-rear-thigh",
"length": 88.06,
"rotation": 28.35,
"x": -8.59,
"y": 30.19,
"color": "ff0000ff"
},
{
"name": "left-rear-leg",
"parent": "left-rear-thigh",
"length": 103.74,
"rotation": -122.41,
"x": 96.04,
"y": -0.97,
"color": "ff0000ff"
},
{ "name": "left-wing", "parent": "chest", "length": 301.12, "rotation": -75.51, "x": -7.25, "y": -24.66, "color": "ff0000ff" },
{
"name": "right-front-thigh",
"parent": "chest",
"length": 81.64,
"rotation": 67.97,
"x": -10.89,
"y": 28.25,
"color": "29ff00ff"
},
{
"name": "right-front-leg",
"parent": "right-front-thigh",
"length": 66.53,
"rotation": 92.7,
"x": 83.05,
"y": -0.31,
"color": "29ff00ff"
},
{
"name": "right-front-toe1",
"parent": "right-front-leg",
"length": 46.66,
"rotation": 8.59,
"x": 70.03,
"y": 5.31,
"color": "29ff00ff"
},
{
"name": "right-front-toe2",
"parent": "right-front-leg",
"length": 53.67,
"rotation": -35.02,
"x": 66.53,
"y": 0.34,
"color": "29ff00ff"
},
{
"name": "right-front-toe3",
"parent": "right-front-leg",
"length": 58.39,
"rotation": -74.67,
"x": 62.1,
"y": -0.79,
"color": "29ff00ff"
},
{
"name": "right-rear-leg",
"parent": "right-rear-thigh",
"length": 91.06,
"rotation": -129.04,
"x": 123.47,
"y": -0.27,
"color": "29ff00ff"
},
{
"name": "right-rear-toe1",
"parent": "right-rear-leg",
"length": 95,
"rotation": 141.98,
"x": 90.07,
"y": 2.12,
"color": "29ff00ff"
},
{
"name": "right-rear-toe2",
"parent": "right-rear-leg",
"length": 99.29,
"rotation": 125.32,
"x": 89.6,
"y": 1.52,
"color": "29ff00ff"
},
{
"name": "right-rear-toe3",
"parent": "right-rear-leg",
"length": 103.46,
"rotation": 112.27,
"x": 91.06,
"y": -0.35,
"color": "29ff00ff"
},
{ "name": "right-wing", "parent": "head", "length": 359.5, "rotation": 83.21, "x": -74.68, "y": 20.91, "color": "29ff00ff" },
{ "name": "tail1", "parent": "back", "length": 65.65, "rotation": 44.32, "x": 115.38, "y": -0.2, "color": "ffe400ff" },
{ "name": "tail2", "parent": "tail1", "length": 54.5, "rotation": 12, "x": 65.65, "y": 0.23, "color": "ffe400ff" },
{ "name": "tail3", "parent": "tail2", "length": 41.78, "rotation": 1.8, "x": 54.5, "y": 0.37, "color": "ffe400ff" },
{ "name": "tail4", "parent": "tail3", "length": 34.19, "rotation": -1.8, "x": 41.78, "y": 0.16, "color": "ffe400ff" },
{ "name": "tail5", "parent": "tail4", "length": 32.33, "rotation": -3.15, "x": 34.19, "y": -0.19, "color": "ffe400ff" },
{ "name": "tail6", "parent": "tail5", "length": 80.08, "rotation": -29.55, "x": 32.33, "y": -0.23, "color": "ffe400ff" }
],
"slots": [
{ "name": "L_rear_leg", "bone": "L_rear_leg", "attachment": "L_rear_leg" },
{ "name": "L_rear_thigh", "bone": "L_rear_thigh", "attachment": "L_rear_thigh" },
{ "name": "L_wing", "bone": "L_wing", "attachment": "L_wing01" },
{ "name": "left-rear-leg", "bone": "left-rear-leg", "attachment": "left-rear-leg" },
{ "name": "left-rear-thigh", "bone": "left-rear-thigh", "attachment": "left-rear-thigh" },
{ "name": "left-wing", "bone": "left-wing", "attachment": "left-wing01" },
{ "name": "tail6", "bone": "tail6", "attachment": "tail06" },
{ "name": "tail5", "bone": "tail5", "attachment": "tail05" },
{ "name": "tail4", "bone": "tail4", "attachment": "tail04" },
@ -46,106 +176,30 @@
{ "name": "tail2", "bone": "tail2", "attachment": "tail02" },
{ "name": "tail1", "bone": "tail1", "attachment": "tail01" },
{ "name": "back", "bone": "back", "attachment": "back" },
{ "name": "L_front_thigh", "bone": "L_front_thigh", "attachment": "L_front_thigh" },
{ "name": "L_front_leg", "bone": "L_front_leg", "attachment": "L_front_leg" },
{ "name": "L_front_toe1", "bone": "L_front_toe1", "attachment": "front_toeA" },
{ "name": "L_front_toe4", "bone": "L_front_toe4", "attachment": "front_toeB" },
{ "name": "L_front_toe3", "bone": "L_front_toe3", "attachment": "front_toeB" },
{ "name": "L_front_toe2", "bone": "L_front_toe2", "attachment": "front_toeB" },
{ "name": "left-front-thigh", "bone": "left-front-thigh", "attachment": "left-front-thigh" },
{ "name": "left-front-leg", "bone": "left-front-leg", "attachment": "left-front-leg" },
{ "name": "left-front-toe1", "bone": "left-front-toe1", "attachment": "front-toe-a" },
{ "name": "left-front-toe4", "bone": "left-front-toe4", "attachment": "front-toe-b" },
{ "name": "left-front-toe3", "bone": "left-front-toe3", "attachment": "front-toe-b" },
{ "name": "left-front-toe2", "bone": "left-front-toe2", "attachment": "front-toe-b" },
{ "name": "chest", "bone": "chest", "attachment": "chest" },
{ "name": "R_rear_toe1", "bone": "R_rear_toe1", "attachment": "rear-toe" },
{ "name": "R_rear_toe2", "bone": "R_rear_toe2", "attachment": "rear-toe" },
{ "name": "R_rear_toe3", "bone": "R_rear_toe3", "attachment": "rear-toe" },
{ "name": "R_rear_leg", "bone": "R_rear_leg", "attachment": "R_rear_leg" },
{ "name": "R_rear_thigh", "bone": "R_rear_thigh", "attachment": "R_rear_thigh" },
{ "name": "R_front_toe1", "bone": "R_front_toe1", "attachment": "front_toeB" },
{ "name": "R_front_thigh", "bone": "R_front_thigh", "attachment": "R_front_thigh" },
{ "name": "R_front_leg", "bone": "R_front_leg", "attachment": "R_front_leg" },
{ "name": "R_front_toe2", "bone": "R_front_toe2", "attachment": "front_toeB" },
{ "name": "R_front_toe3", "bone": "R_front_toe3", "attachment": "front_toeB" },
{ "name": "right-rear-toe1", "bone": "right-rear-toe1", "attachment": "right-rear-toe" },
{ "name": "right-rear-toe2", "bone": "right-rear-toe2", "attachment": "right-rear-toe" },
{ "name": "right-rear-toe3", "bone": "right-rear-toe3", "attachment": "right-rear-toe" },
{ "name": "right-rear-leg", "bone": "right-rear-leg", "attachment": "right-rear-leg" },
{ "name": "right-rear-thigh", "bone": "right-rear-thigh", "attachment": "right-rear-thigh" },
{ "name": "right-front-toe1", "bone": "right-front-toe1", "attachment": "front-toe-b" },
{ "name": "right-front-thigh", "bone": "right-front-thigh", "attachment": "right-front-thigh" },
{ "name": "right-front-leg", "bone": "right-front-leg", "attachment": "right-front-leg" },
{ "name": "right-front-toe2", "bone": "right-front-toe2", "attachment": "front-toe-b" },
{ "name": "right-front-toe3", "bone": "right-front-toe3", "attachment": "front-toe-b" },
{ "name": "chin", "bone": "chin", "attachment": "chin" },
{ "name": "R_wing", "bone": "R_wing", "attachment": "R_wing01" },
{ "name": "right-wing", "bone": "right-wing", "attachment": "right-wing01" },
{ "name": "head", "bone": "head", "attachment": "head" },
{ "name": "logo", "bone": "root", "attachment": "logo" }
{ "name": "thiagobrayner", "bone": "root", "attachment": "thiagobrayner" }
],
"skins": {
"default": {
"L_front_leg": {
"L_front_leg": { "x": 14.69, "y": 0.49, "rotation": 16, "width": 84, "height": 57 }
},
"L_front_thigh": {
"L_front_thigh": { "x": 27.66, "y": -11.59, "rotation": 58.66, "width": 84, "height": 72 }
},
"L_front_toe1": {
"front_toeA": { "x": 31.93, "y": 0.61, "rotation": 109.56, "width": 29, "height": 50 }
},
"L_front_toe2": {
"front_toeB": { "x": 26.84, "y": -4.95, "rotation": 109.51, "width": 56, "height": 57 }
},
"L_front_toe3": {
"front_toeB": { "x": 18.22, "y": -7.22, "scaleX": 0.881, "scaleY": 0.941, "rotation": 99.71, "width": 56, "height": 57 }
},
"L_front_toe4": {
"front_toeB": { "x": 23.21, "y": -11.69, "scaleX": 0.881, "rotation": 79.89, "width": 56, "height": 57 }
},
"L_rear_leg": {
"L_rear_leg": { "x": 67.29, "y": 12.63, "rotation": -162.65, "width": 206, "height": 177 }
},
"L_rear_thigh": {
"L_rear_thigh": { "x": 56.03, "y": 27.39, "rotation": 74.94, "width": 91, "height": 149 }
},
"L_wing": {
"L_wing01": { "x": 129.21, "y": -45.49, "rotation": -83.7, "width": 191, "height": 256 },
"L_wing02": { "x": 126.38, "y": -31.69, "rotation": -86.19, "width": 179, "height": 269 },
"L_wing03": { "x": 110.27, "y": -90.89, "rotation": -86.19, "width": 186, "height": 207 },
"L_wing04": { "x": -61.62, "y": -83.27, "rotation": -86.19, "width": 188, "height": 135 },
"L_wing05": { "x": -90.02, "y": -78.14, "rotation": -86.19, "width": 218, "height": 213 },
"L_wing06": { "x": -143.77, "y": -83.72, "rotation": -86.19, "width": 192, "height": 331 },
"L_wing07": { "x": -133.05, "y": -33.9, "rotation": -86.19, "width": 159, "height": 255 },
"L_wing08": { "x": 50.15, "y": -15.71, "rotation": -86.19, "width": 164, "height": 181 },
"L_wing09": { "x": 85.94, "y": -11.33, "rotation": -86.19, "width": 204, "height": 167 }
},
"R_front_leg": {
"R_front_leg": { "x": 17.8, "y": 4.23, "rotation": 37.63, "width": 101, "height": 89 }
},
"R_front_thigh": {
"R_front_thigh": { "x": 35.29, "y": 2.11, "rotation": 130.33, "width": 108, "height": 108 }
},
"R_front_toe1": {
"front_toeB": { "x": 24.5, "y": -2.61, "rotation": 104.18, "width": 56, "height": 57 }
},
"R_front_toe2": {
"front_toeB": { "x": 26.39, "y": 1.17, "rotation": 104.58, "width": 56, "height": 57 }
},
"R_front_toe3": {
"front_toeB": { "x": 30.67, "y": -0.07, "rotation": 112.3, "width": 56, "height": 57 }
},
"R_rear_leg": {
"R_rear_leg": { "x": 60.88, "y": -5.73, "rotation": -127.67, "width": 116, "height": 100 }
},
"R_rear_thigh": {
"R_rear_thigh": { "x": 53.25, "y": 12.58, "rotation": 103.29, "width": 91, "height": 149 }
},
"R_rear_toe1": {
"rear-toe": { "x": 54.76, "y": -5.72, "rotation": 134.79, "width": 109, "height": 77 }
},
"R_rear_toe2": {
"rear-toe": { "x": 57.03, "y": -7.23, "rotation": 134.43, "width": 109, "height": 77 }
},
"R_rear_toe3": {
"rear-toe": { "x": 47.46, "y": -7.64, "rotation": 134.34, "width": 109, "height": 77 }
},
"R_wing": {
"R_wing01": { "x": 170.08, "y": -23.68, "rotation": -130.34, "width": 219, "height": 310 },
"R_wing02": { "x": 171.15, "y": -19.33, "rotation": -130.34, "width": 203, "height": 305 },
"R_wing03": { "x": 166.46, "y": 29.24, "rotation": -130.34, "width": 272, "height": 247 },
"R_wing04": { "x": 42.94, "y": 134.06, "rotation": -130.34, "width": 279, "height": 144 },
"R_wing05": { "x": -8.84, "y": 142.59, "rotation": -130.34, "width": 251, "height": 229 },
"R_wing06": { "x": -123.33, "y": 111.22, "rotation": -130.34, "width": 200, "height": 366 },
"R_wing07": { "x": -40.17, "y": 118.03, "rotation": -130.34, "width": 200, "height": 263 },
"R_wing08": { "x": 48.02, "y": 28.76, "rotation": -130.34, "width": 234, "height": 254 },
"R_wing09": { "x": 128.1, "y": 21.13, "rotation": -130.34, "width": 248, "height": 204 }
},
"back": {
"back": { "x": 35.85, "y": 19.99, "rotation": -151.83, "width": 190, "height": 185 }
},
@ -158,8 +212,81 @@
"head": {
"head": { "x": 76.69, "y": 32.21, "rotation": -47.13, "width": 296, "height": 260 }
},
"logo": {
"logo": { "y": -176.72, "width": 897, "height": 92 }
"left-front-leg": {
"left-front-leg": { "x": 14.69, "y": 0.49, "rotation": 16, "width": 84, "height": 57 }
},
"left-front-thigh": {
"left-front-thigh": { "x": 27.66, "y": -11.59, "rotation": 58.66, "width": 84, "height": 72 }
},
"left-front-toe1": {
"front-toe-a": { "x": 31.93, "y": 0.61, "rotation": 109.56, "width": 29, "height": 50 }
},
"left-front-toe2": {
"front-toe-b": { "x": 26.84, "y": -4.95, "rotation": 109.51, "width": 56, "height": 57 }
},
"left-front-toe3": {
"front-toe-b": { "x": 18.22, "y": -7.22, "scaleX": 0.881, "scaleY": 0.941, "rotation": 99.71, "width": 56, "height": 57 }
},
"left-front-toe4": {
"front-toe-b": { "x": 23.21, "y": -11.69, "scaleX": 0.881, "rotation": 79.89, "width": 56, "height": 57 }
},
"left-rear-leg": {
"left-rear-leg": { "x": 67.29, "y": 12.63, "rotation": -162.65, "width": 206, "height": 177 }
},
"left-rear-thigh": {
"left-rear-thigh": { "x": 56.03, "y": 27.39, "rotation": 74.94, "width": 91, "height": 149 }
},
"left-wing": {
"left-wing01": { "x": 129.21, "y": -45.49, "rotation": -83.7, "width": 191, "height": 256 },
"left-wing02": { "x": 126.38, "y": -31.69, "rotation": -86.19, "width": 179, "height": 269 },
"left-wing03": { "x": 110.27, "y": -90.89, "rotation": -86.19, "width": 186, "height": 207 },
"left-wing04": { "x": -61.62, "y": -83.27, "rotation": -86.19, "width": 188, "height": 135 },
"left-wing05": { "x": -90.02, "y": -78.14, "rotation": -86.19, "width": 218, "height": 213 },
"left-wing06": { "x": -143.77, "y": -83.72, "rotation": -86.19, "width": 192, "height": 331 },
"left-wing07": { "x": -133.05, "y": -33.9, "rotation": -86.19, "width": 159, "height": 255 },
"left-wing08": { "x": 50.15, "y": -15.71, "rotation": -86.19, "width": 164, "height": 181 },
"left-wing09": { "x": 85.94, "y": -11.33, "rotation": -86.19, "width": 204, "height": 167 }
},
"right-front-leg": {
"right-front-leg": { "x": 17.8, "y": 4.23, "rotation": 37.63, "width": 101, "height": 89 }
},
"right-front-thigh": {
"right-front-thigh": { "x": 35.29, "y": 2.11, "rotation": 130.33, "width": 108, "height": 108 }
},
"right-front-toe1": {
"front-toe-b": { "x": 24.5, "y": -2.61, "rotation": 104.18, "width": 56, "height": 57 }
},
"right-front-toe2": {
"front-toe-b": { "x": 26.39, "y": 1.17, "rotation": 104.58, "width": 56, "height": 57 }
},
"right-front-toe3": {
"front-toe-b": { "x": 30.67, "y": -0.07, "rotation": 112.3, "width": 56, "height": 57 }
},
"right-rear-leg": {
"right-rear-leg": { "x": 60.88, "y": -5.73, "rotation": -127.67, "width": 116, "height": 100 }
},
"right-rear-thigh": {
"right-rear-thigh": { "x": 53.25, "y": 12.58, "rotation": 103.29, "width": 91, "height": 149 }
},
"right-rear-toe1": {
"right-rear-toe": { "x": 54.76, "y": -5.72, "rotation": 134.79, "width": 109, "height": 77 }
},
"right-rear-toe2": {
"right-rear-toe": { "x": 57.03, "y": -7.23, "rotation": 134.43, "width": 109, "height": 77 }
},
"right-rear-toe3": {
"right-rear-toe": { "x": 47.46, "y": -7.64, "rotation": 134.34, "width": 109, "height": 77 }
},
"right-wing": {
"right-wing01": { "x": 170.08, "y": -23.68, "rotation": -130.34, "width": 219, "height": 310 },
"right-wing02": { "x": 171.15, "y": -19.33, "rotation": -130.34, "width": 203, "height": 305 },
"right-wing03": { "x": 166.46, "y": 29.24, "rotation": -130.34, "width": 272, "height": 247 },
"right-wing04": { "x": 42.94, "y": 134.06, "rotation": -130.34, "width": 279, "height": 144 },
"right-wing05": { "x": -8.84, "y": 142.59, "rotation": -130.34, "width": 251, "height": 229 },
"right-wing06": { "x": -123.33, "y": 111.22, "rotation": -130.34, "width": 200, "height": 366 },
"right-wing07": { "x": -40.17, "y": 118.03, "rotation": -130.34, "width": 200, "height": 263 },
"right-wing08": { "x": 48.02, "y": 28.76, "rotation": -130.34, "width": 234, "height": 254 },
"right-wing09": { "x": 128.1, "y": 21.13, "rotation": -130.34, "width": 248, "height": 204 }
},
"tail1": {
"tail01": { "x": 22.6, "y": -4.5, "rotation": 163.85, "width": 120, "height": 153 }
@ -178,55 +305,58 @@
},
"tail6": {
"tail06": { "x": 28.02, "y": -16.83, "rotation": -175.45, "width": 95, "height": 68 }
},
"thiagobrayner": {
"thiagobrayner": { "y": -95, "width": 350, "height": 31 }
}
}
},
"animations": {
"flying": {
"slots": {
"L_wing": {
"left-wing": {
"attachment": [
{ "time": 0, "name": "L_wing01" },
{ "time": 0.0667, "name": "L_wing02" },
{ "time": 0.1333, "name": "L_wing03" },
{ "time": 0.2, "name": "L_wing04" },
{ "time": 0.2667, "name": "L_wing05" },
{ "time": 0.3333, "name": "L_wing06" },
{ "time": 0.4, "name": "L_wing07" },
{ "time": 0.4667, "name": "L_wing08" },
{ "time": 0.5333, "name": "L_wing09" },
{ "time": 0.6, "name": "L_wing01" },
{ "time": 0.7333, "name": "L_wing02" },
{ "time": 0.8, "name": "L_wing03" },
{ "time": 0.8333, "name": "L_wing04" },
{ "time": 0.8667, "name": "L_wing05" },
{ "time": 0.9, "name": "L_wing06" },
{ "time": 0.9333, "name": "L_wing07" },
{ "time": 0.9667, "name": "L_wing08" },
{ "time": 1, "name": "L_wing01" }
{ "time": 0, "name": "left-wing01" },
{ "time": 0.0667, "name": "left-wing02" },
{ "time": 0.1333, "name": "left-wing03" },
{ "time": 0.2, "name": "left-wing04" },
{ "time": 0.2667, "name": "left-wing05" },
{ "time": 0.3333, "name": "left-wing06" },
{ "time": 0.4, "name": "left-wing07" },
{ "time": 0.4667, "name": "left-wing08" },
{ "time": 0.5333, "name": "left-wing09" },
{ "time": 0.6, "name": "left-wing01" },
{ "time": 0.7333, "name": "left-wing02" },
{ "time": 0.8, "name": "left-wing03" },
{ "time": 0.8333, "name": "left-wing04" },
{ "time": 0.8667, "name": "left-wing05" },
{ "time": 0.9, "name": "left-wing06" },
{ "time": 0.9333, "name": "left-wing07" },
{ "time": 0.9667, "name": "left-wing08" },
{ "time": 1, "name": "left-wing01" }
]
},
"R_wing": {
"right-wing": {
"attachment": [
{ "time": 0, "name": "R_wing01" },
{ "time": 0.0667, "name": "R_wing02" },
{ "time": 0.1333, "name": "R_wing03" },
{ "time": 0.2, "name": "R_wing04" },
{ "time": 0.2667, "name": "R_wing05" },
{ "time": 0.3333, "name": "R_wing06" },
{ "time": 0.4, "name": "R_wing07" },
{ "time": 0.4667, "name": "R_wing08" },
{ "time": 0.5333, "name": "R_wing09" },
{ "time": 0.6, "name": "R_wing01" },
{ "time": 0.7333, "name": "R_wing02" },
{ "time": 0.7667, "name": "R_wing02" },
{ "time": 0.8, "name": "R_wing03" },
{ "time": 0.8333, "name": "R_wing04" },
{ "time": 0.8667, "name": "R_wing05" },
{ "time": 0.9, "name": "R_wing06" },
{ "time": 0.9333, "name": "R_wing07" },
{ "time": 0.9667, "name": "R_wing08" },
{ "time": 1, "name": "R_wing01" }
{ "time": 0, "name": "right-wing01" },
{ "time": 0.0667, "name": "right-wing02" },
{ "time": 0.1333, "name": "right-wing03" },
{ "time": 0.2, "name": "right-wing04" },
{ "time": 0.2667, "name": "right-wing05" },
{ "time": 0.3333, "name": "right-wing06" },
{ "time": 0.4, "name": "right-wing07" },
{ "time": 0.4667, "name": "right-wing08" },
{ "time": 0.5333, "name": "right-wing09" },
{ "time": 0.6, "name": "right-wing01" },
{ "time": 0.7333, "name": "right-wing02" },
{ "time": 0.7667, "name": "right-wing02" },
{ "time": 0.8, "name": "right-wing03" },
{ "time": 0.8333, "name": "right-wing04" },
{ "time": 0.8667, "name": "right-wing05" },
{ "time": 0.9, "name": "right-wing06" },
{ "time": 0.9333, "name": "right-wing07" },
{ "time": 0.9667, "name": "right-wing08" },
{ "time": 1, "name": "right-wing01" }
]
}
},
@ -307,7 +437,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"R_rear_thigh": {
"right-rear-thigh": {
"rotate": [
{ "time": 0, "angle": 0, "curve": "stepped" },
{ "time": 0.5, "angle": 0, "curve": "stepped" },
@ -424,7 +554,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"R_rear_leg": {
"right-rear-leg": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.1667, "angle": -14.22 },
@ -442,7 +572,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"R_rear_toe3": {
"right-rear-toe3": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.5, "angle": -36.06 },
@ -459,7 +589,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"R_rear_toe2": {
"right-rear-toe2": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.5, "angle": -20.32 },
@ -476,7 +606,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"R_rear_toe1": {
"right-rear-toe1": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.5, "angle": -18.71 },
@ -537,7 +667,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"L_front_thigh": {
"left-front-thigh": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.1667, "angle": -19.19 },
@ -556,7 +686,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"R_front_thigh": {
"right-front-thigh": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.1667, "angle": -12.96 },
@ -574,7 +704,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"L_front_leg": {
"left-front-leg": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.1667, "angle": 37.77 },
@ -592,7 +722,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"L_front_toe1": {
"left-front-toe1": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.1667, "angle": -16.09 },
@ -610,7 +740,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"L_front_toe2": {
"left-front-toe2": {
"rotate": [
{ "time": 0, "angle": 0, "curve": "stepped" },
{ "time": 0.5, "angle": 0, "curve": "stepped" },
@ -627,7 +757,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"L_front_toe4": {
"left-front-toe4": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.5, "angle": 26.52 },
@ -644,7 +774,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"L_front_toe3": {
"left-front-toe3": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.5, "angle": 16.99 },
@ -661,7 +791,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"R_front_leg": {
"right-front-leg": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.1667, "angle": 26.07 },
@ -679,7 +809,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"R_front_toe1": {
"right-front-toe1": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.1667, "angle": 29.24 },
@ -697,7 +827,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"R_front_toe2": {
"right-front-toe2": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.1667, "angle": 24.9 },
@ -715,7 +845,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"R_front_toe3": {
"right-front-toe3": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.1667, "angle": 11.01 },
@ -733,7 +863,7 @@
{ "time": 1, "x": 1, "y": 1 }
]
},
"L_rear_leg": {
"left-rear-leg": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.3667, "angle": 25.19 },
@ -747,7 +877,7 @@
{ "time": 0, "x": 1, "y": 1 }
]
},
"COG": {
"center": {
"rotate": [
{
"time": 0,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 585 KiB

After

Width:  |  Height:  |  Size: 593 KiB

View File

@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 6bc52290ef03f2846ba38d67e2823598
timeCreated: 1487920373
timeCreated: 1497481082
licenseType: Free
TextureImporter:
fileIDToRecycleName:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 KiB

After

Width:  |  Height:  |  Size: 192 KiB

View File

@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 12c126994123f12468cf4c5a2684078a
timeCreated: 1487920372
timeCreated: 1497481081
licenseType: Free
TextureImporter:
fileIDToRecycleName:

View File

@ -1,4 +1,4 @@
Copyright (c) 2013, ODI EntertainmenT
Copyright (c) 2013, Thiago Brayner - www.thiagobrayner.com
The project file and images in this "dragon" project are provided for
demonstration purposes only and may not be redistributed for any reason nor

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 91aa25fdfcac76c47a07fab9862f8c09
folderAsset: yes
timeCreated: 1497484602
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,293 @@
spineboy.png
size: 2048,1024
format: RGBA8888
filter: Linear,Linear
repeat: none
crosshair
rotate: false
xy: 1862, 497
size: 89, 89
orig: 89, 89
offset: 0, 0
index: -1
dust01
rotate: true
xy: 748, 372
size: 96, 73
orig: 96, 73
offset: 0, 0
index: -1
dust02
rotate: false
xy: 934, 431
size: 86, 88
orig: 86, 88
offset: 0, 0
index: -1
dust03
rotate: false
xy: 1965, 591
size: 62, 52
orig: 62, 52
offset: 0, 0
index: -1
eye-indifferent
rotate: false
xy: 1870, 649
size: 93, 89
orig: 93, 89
offset: 0, 0
index: -1
eye-surprised
rotate: false
xy: 823, 380
size: 93, 89
orig: 93, 89
offset: 0, 0
index: -1
front-bracer
rotate: true
xy: 1225, 521
size: 58, 80
orig: 58, 80
offset: 0, 0
index: -1
front-fist-closed
rotate: false
xy: 1022, 441
size: 75, 82
orig: 75, 82
offset: 0, 0
index: -1
front-fist-open
rotate: true
xy: 1953, 439
size: 86, 87
orig: 86, 87
offset: 0, 0
index: -1
front-foot
rotate: true
xy: 1799, 602
size: 126, 69
orig: 126, 69
offset: 0, 0
index: -1
front-shin
rotate: true
xy: 278, 2
size: 82, 184
orig: 82, 184
offset: 0, 0
index: -1
front-thigh
rotate: true
xy: 820, 471
size: 48, 112
orig: 48, 112
offset: 0, 0
index: -1
front-upper-arm
rotate: true
xy: 1020, 525
size: 54, 97
orig: 54, 97
offset: 0, 0
index: -1
goggles
rotate: true
xy: 1855, 740
size: 261, 166
orig: 261, 166
offset: 0, 0
index: -1
gun
rotate: false
xy: 1329, 644
size: 210, 203
orig: 210, 203
offset: 0, 0
index: -1
head
rotate: true
xy: 1555, 730
size: 271, 298
orig: 271, 298
offset: 0, 0
index: -1
hoverboard-board
rotate: false
xy: 1061, 849
size: 492, 152
orig: 492, 152
offset: 0, 0
index: -1
hoverboard-thruster
rotate: false
xy: 710, 29
size: 60, 64
orig: 60, 64
offset: 0, 0
index: -1
hoverglow-small
rotate: false
xy: 2, 9
size: 274, 75
orig: 274, 75
offset: 0, 0
index: -1
mouth-grind
rotate: true
xy: 1965, 645
size: 93, 59
orig: 93, 59
offset: 0, 0
index: -1
mouth-oooo
rotate: false
xy: 1870, 588
size: 93, 59
orig: 93, 59
offset: 0, 0
index: -1
mouth-smile
rotate: false
xy: 1953, 527
size: 93, 59
orig: 93, 59
offset: 0, 0
index: -1
muzzle-glow
rotate: false
xy: 820, 521
size: 198, 198
orig: 198, 198
offset: 0, 0
index: -1
muzzle01
rotate: false
xy: 2, 86
size: 474, 275
orig: 474, 275
offset: 0, 0
index: -1
muzzle02
rotate: false
xy: 568, 721
size: 491, 280
orig: 491, 280
offset: 0, 0
index: -1
muzzle03
rotate: false
xy: 2, 363
size: 562, 316
orig: 562, 316
offset: 0, 0
index: -1
muzzle04
rotate: false
xy: 2, 681
size: 564, 320
orig: 564, 320
offset: 0, 0
index: -1
neck
rotate: false
xy: 1020, 678
size: 36, 41
orig: 36, 41
offset: 0, 0
index: -1
portal-bg
rotate: false
xy: 1061, 581
size: 266, 266
orig: 266, 266
offset: 0, 0
index: -1
portal-flare1
rotate: false
xy: 918, 369
size: 111, 60
orig: 111, 60
offset: 0, 0
index: -1
portal-flare2
rotate: true
xy: 1799, 486
size: 114, 61
orig: 114, 61
offset: 0, 0
index: -1
portal-flare3
rotate: false
xy: 478, 34
size: 115, 59
orig: 115, 59
offset: 0, 0
index: -1
portal-shade
rotate: false
xy: 478, 95
size: 266, 266
orig: 266, 266
offset: 0, 0
index: -1
portal-streaks1
rotate: true
xy: 1541, 476
size: 252, 256
orig: 252, 256
offset: 0, 0
index: -1
portsl-streaks2
rotate: false
xy: 568, 470
size: 250, 249
orig: 250, 249
offset: 0, 0
index: -1
rear-bracer
rotate: false
xy: 1031, 367
size: 56, 72
orig: 56, 72
offset: 0, 0
index: -1
rear-foot
rotate: false
xy: 595, 33
size: 113, 60
orig: 113, 60
offset: 0, 0
index: -1
rear-shin
rotate: true
xy: 1329, 567
size: 75, 178
orig: 75, 178
offset: 0, 0
index: -1
rear-thigh
rotate: true
xy: 1119, 514
size: 65, 104
orig: 65, 104
offset: 0, 0
index: -1
rear-upper-arm
rotate: true
xy: 1099, 465
size: 47, 87
orig: 47, 87
offset: 0, 0
index: -1
torso
rotate: true
xy: 566, 370
size: 98, 180
orig: 98, 180
offset: 0, 0
index: -1

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: baa2a4228a0622e48ade89f9329a21db
timeCreated: 1497484603
licenseType: Free
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c4a131ce07ddbbf4fa38e01f472a366f
timeCreated: 1497484603
licenseType: Free
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@ -0,0 +1,68 @@
fileFormatVersion: 2
guid: 775ade7081c168944b4fb20357ce370a
timeCreated: 1497484603
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
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
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a6b194f808b1af6499c93410e504af42, type: 3}
m_Name: spineboy_Atlas
m_EditorClassIdentifier:
atlasFile: {fileID: 4900000, guid: baa2a4228a0622e48ade89f9329a21db, type: 3}
materials:
- {fileID: 2100000, guid: 86873d92b9c6412428e6e2d4f827c88b, type: 2}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 2fc9866d5b475d74b981f97a77312320
timeCreated: 1497484603
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: spineboy_Material
m_Shader: {fileID: 4800000, guid: 1e8a610c9e01c3648bac42585e5fc676, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 775ade7081c168944b4fb20357ce370a, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Cutoff: 0.1
m_Colors: []

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 86873d92b9c6412428e6e2d4f827c88b
timeCreated: 1497484603
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,34 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f1b3b4b945939a54ea0b23d3396115fb, type: 3}
m_Name: spineboy_SkeletonData
m_EditorClassIdentifier:
atlasAssets:
- {fileID: 11400000, guid: 2fc9866d5b475d74b981f97a77312320, type: 2}
scale: 0.01
skeletonJSON: {fileID: 4900000, guid: c4a131ce07ddbbf4fa38e01f472a366f, type: 3}
fromAnimation:
- idle
- run
- walk
- run
toAnimation:
- idle-turn
- run-to-idle
- run
- walk
duration:
- 0
- 0.05
- 0.3
- 0.3
defaultMix: 0.1
controller: {fileID: 0}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 45a15bf53b040de42b2adbc759a40203
timeCreated: 1497484603
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "pT8+kphidZDzlY5lbXpU0cNNzmQ",
"spine": "3.6.18-beta",
"hash": "fdIxd7co0AmzNYI1JtoFSg51K0U",
"spine": "3.6.30-beta",
"width": 470.71,
"height": 731.57,
"images": "C:/Program Files (x86)/Spine/examples/spineboy/images/"
@ -789,21 +789,22 @@
},
"muzzle": {
"color": [
{ "time": 0, "color": "0000803e", "curve": "stepped" },
{ "time": 0.7667, "color": "0000803e", "curve": "stepped" },
{ "time": 0.8, "color": "0000803e", "curve": "stepped" },
{ "time": 0.8333, "color": "0000803e", "curve": "stepped" },
{ "time": 0.8667, "color": "0000803e", "curve": "stepped" },
{ "time": 0.9, "color": "0000803e", "curve": "stepped" },
{ "time": 0.9333, "color": "0000803e", "curve": "stepped" },
{ "time": 0.9667, "color": "0000803e", "curve": "stepped" },
{ "time": 1.1, "color": "0000803e", "curve": "stepped" },
{ "time": 1.1333, "color": "0000803e", "curve": "stepped" },
{ "time": 1.2, "color": "0000803e", "curve": "stepped" },
{ "time": 1.2333, "color": "0000803e", "curve": "stepped" },
{ "time": 1.2667, "color": "0000803e", "curve": "stepped" },
{ "time": 1.3333, "color": "0000803e", "curve": "stepped" },
{ "time": 2.5333, "color": "0000803e" }
{ "time": 0, "color": "00008000", "curve": "stepped" },
{ "time": 0.7667, "color": "fffffffe", "curve": "stepped" },
{ "time": 0.8, "color": "ffffff00", "curve": "stepped" },
{ "time": 0.8333, "color": "fffffffe", "curve": "stepped" },
{ "time": 0.8667, "color": "ffffff00", "curve": "stepped" },
{ "time": 0.9, "color": "fffffffe", "curve": "stepped" },
{ "time": 0.9333, "color": "ffffff00", "curve": "stepped" },
{ "time": 0.9667, "color": "fffffffe", "curve": "stepped" },
{ "time": 1, "color": "ffffff00", "curve": "stepped" },
{ "time": 1.1, "color": "fffffffe", "curve": "stepped" },
{ "time": 1.1333, "color": "ffffff00", "curve": "stepped" },
{ "time": 1.2, "color": "fffffffe", "curve": "stepped" },
{ "time": 1.2333, "color": "ffffff00", "curve": "stepped" },
{ "time": 1.2667, "color": "fffffffe", "curve": "stepped" },
{ "time": 1.3333, "color": "ffffff00", "curve": "stepped" },
{ "time": 2.5333, "color": "ffffff00" }
],
"attachment": [
{ "time": 0, "name": null },
@ -1976,7 +1977,9 @@
"slots": {
"front_fist": {
"attachment": [
{ "time": 0.1, "name": "front_fist_open" }
{ "time": 0, "name": "front_fist_open" },
{ "time": 0.1, "name": "front_fist_open" },
{ "time": 0.2, "name": "front_fist_open" }
]
},
"mouth": {
@ -1989,93 +1992,162 @@
"bones": {
"torso": {
"rotate": [
{ "time": 0, "angle": 56.42 },
{ "time": 0.2, "angle": 8.89 }
{
"time": 0,
"angle": -20.26,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "angle": -5.62 }
],
"translate": [
{
"time": 0,
"x": 0,
"y": 0,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "x": -6.5, "y": 0 }
]
},
"neck": {
"rotate": [
{ "time": 0, "angle": 35.39 },
{ "time": 0.1333, "angle": 24.95 }
{
"time": 0,
"angle": -0.49,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.1333, "angle": 24.95 },
{ "time": 0.2, "angle": 0 }
]
},
"head": {
"rotate": [
{ "time": 0, "angle": 10.22 },
{ "time": 0.2, "angle": -41.3 }
{
"time": 0,
"angle": -46.07,
"curve": [ 0.352, 0, 0.492, 0.6 ]
},
{ "time": 0.2, "angle": -5.51 }
]
},
"front_upper_arm": {
"rotate": [
{
"time": 0,
"angle": -310.93,
"curve": [ 0.38, 0.53, 0.745, 1 ]
"angle": -73.85,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "angle": -112.6 }
{ "time": 0.2, "angle": -59.85 }
],
"translate": [
{ "time": 0, "x": 7.23, "y": -13.13 }
{
"time": 0,
"x": -9.77,
"y": 0.42,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "x": -7.12, "y": -8.24 }
]
},
"front_bracer": {
"rotate": [
{ "time": 0, "angle": 36.99 },
{ "time": 0.2, "angle": -28.65 }
{
"time": 0,
"angle": 75.83,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "angle": 45.47 }
]
},
"front_fist": {
"rotate": [
{ "time": 0, "angle": 13.59 },
{ "time": 0.2, "angle": 7.56 }
{
"time": 0,
"angle": 13.59,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "angle": -6.85 }
],
"scale": [
{ "time": 0, "x": 1, "y": 1, "curve": "stepped" },
{ "time": 0.2, "x": 1, "y": 1 }
]
},
"rear_upper_arm": {
"rotate": [
{
"time": 0,
"angle": 271.02,
"curve": [ 0.343, 0.36, 0.68, 0.71 ]
"angle": 255.07,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "angle": -15.84 }
{ "time": 0.2, "angle": 62.42 }
],
"translate": [
{ "time": 0.2, "x": -0.1, "y": -0.46 }
{
"time": 0,
"x": 0,
"y": 0,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "x": -1.83, "y": -16.79 }
]
},
"rear_bracer": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.2, "angle": 40.03 }
{
"time": 0,
"angle": 66.16,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "angle": -17.16 }
]
},
"gun": {
"rotate": [
{ "time": 0, "angle": 14.98 },
{ "time": 0.2, "angle": 39.76 }
{
"time": 0,
"angle": 14.98,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "angle": 0 }
]
},
"front_thigh": {
"rotate": [
{
"time": 0,
"angle": 90.94,
"curve": [ 0.227, 0.27, 0.433, 1 ]
"angle": 26.47,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "angle": 32.03 }
{ "time": 0.2, "angle": 0.65 }
],
"translate": [
{ "time": 0, "x": 7.21, "y": -4 }
{
"time": 0,
"x": 7.21,
"y": -4,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "x": -13.4, "y": 6.7 }
],
"scale": [
{
"time": 0,
"x": 1,
"y": 1,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "x": 0.897, "y": 1 }
]
},
"rear_thigh": {
"rotate": [
{
"time": 0,
"angle": 40.52,
"curve": [ 0.296, 0.3, 0.59, 1 ]
"angle": 47.22,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "angle": 90.77 }
{ "time": 0.2, "angle": 30.51 }
],
"translate": [
{ "time": 0, "x": -1.96, "y": -0.32 }
@ -2083,33 +2155,66 @@
},
"front_shin": {
"rotate": [
{ "time": 0, "angle": -96.63 },
{ "time": 0.2, "angle": -15.13 }
{
"time": 0,
"angle": -67.69,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "angle": -19.29 }
],
"scale": [
{ "time": 0, "x": 1, "y": 1, "curve": "stepped" },
{ "time": 0.2, "x": 1, "y": 1 }
]
},
"rear_shin": {
"rotate": [
{ "time": 0, "angle": 8 },
{ "time": 0.2, "angle": -67.54 }
{
"time": 0,
"angle": -45.94,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "angle": -23.83 }
]
},
"front_foot": {
"rotate": [
{ "time": 0, "angle": 5.4 },
{ "time": 0.2, "angle": -16.27 }
{
"time": 0,
"angle": 5.4,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "angle": 5.14 }
],
"scale": [
{
"time": 0,
"x": 1,
"y": 1,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "x": 0.755, "y": 1.31 }
]
},
"rear_foot": {
"rotate": [
{ "time": 0, "angle": 2.67 },
{ "time": 0.2, "angle": -10.31 }
{
"time": 0,
"angle": -35.72,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "angle": -7.34 }
]
},
"hip": {
"translate": [
{ "time": 0, "x": -75.55, "y": -78.04 },
{ "time": 0.1333, "x": -36.48, "y": 12.42 },
{ "time": 0.2, "x": -36.48, "y": -3 }
{
"time": 0,
"x": -32.67,
"y": 15,
"curve": [ 0.25, 0, 0.275, 1 ]
},
{ "time": 0.2, "x": -6.64, "y": -23.02 }
]
}
}
@ -3745,28 +3850,6 @@
}
}
},
"lastframehidehead": {
"slots": {
"eye": {
"attachment": [
{ "time": 0, "name": "eye_indifferent" },
{ "time": 2, "name": null }
]
},
"goggles": {
"attachment": [
{ "time": 0, "name": "goggles" },
{ "time": 2, "name": null }
]
},
"head": {
"attachment": [
{ "time": 0, "name": "head" },
{ "time": 2, "name": null }
]
}
}
},
"pole": {
"slots": {
"eye": {
@ -4940,10 +5023,19 @@
},
"muzzle": {
"color": [
{ "time": 0.0225, "color": "0000803e", "curve": "stepped" },
{ "time": 0.0667, "color": "0000803e", "curve": "stepped" },
{ "time": 0.1, "color": "0000803e", "curve": "stepped" },
{ "time": 0.1667, "color": "0000803e" }
{
"time": 0.0225,
"color": "ffad76fe",
"curve": [ 0.175, 0.43, 0.534, 0.75 ]
},
{
"time": 0.0333,
"color": "ffc197fe",
"curve": [ 0.286, 0.99, 0.774, 1 ]
},
{ "time": 0.0667, "color": "fffffffe" },
{ "time": 0.1, "color": "ffbc8fee" },
{ "time": 0.1667, "color": "ffa18000" }
],
"attachment": [
{ "time": 0.0333, "name": "muzzle" },
@ -4982,6 +5074,12 @@
},
{ "time": 0.1667, "x": -9.3, "y": -1.41 },
{ "time": 0.2667, "x": 0, "y": 0 }
],
"scale": [
{ "time": 0, "x": 1, "y": 1 },
{ "time": 0.0243, "x": 1.324, "y": 1 },
{ "time": 0.0539, "x": 0.858, "y": 1.085 },
{ "time": 0.1333, "x": 1, "y": 1 }
]
},
"rear_bracer": {
@ -5029,220 +5127,6 @@
]
}
},
"shoot old": {
"slots": {
"front_fist": {
"attachment": [
{ "time": 0.1333, "name": "front_fist_closed" },
{ "time": 0.4, "name": "front_fist_open" }
]
},
"mouth": {
"attachment": [
{ "time": 0.1333, "name": "mouth_grind" }
]
},
"muzzle": {
"color": [
{ "time": 0.1333, "color": "0000803e", "curve": "stepped" },
{ "time": 0.1667, "color": "0000803e", "curve": "stepped" },
{ "time": 0.2667, "color": "0000803e" }
],
"attachment": [
{ "time": 0.1333, "name": "muzzle" },
{ "time": 0.2667, "name": null }
]
}
},
"bones": {
"gunTip": {
"translate": [
{ "time": 0.1333, "x": 0, "y": 0 },
{ "time": 0.2, "x": 20.93, "y": 1.58 }
],
"scale": [
{ "time": 0.1333, "x": 1, "y": 1 },
{ "time": 0.2, "x": 1.247, "y": 1.517 }
]
},
"gun": {
"rotate": [
{ "time": 0, "angle": 1.91 }
],
"translate": [
{
"time": 0,
"x": 7.95,
"y": 5.85,
"curve": [ 0, 0.3, 0.679, 1 ]
},
{ "time": 0.3, "x": -9.3, "y": -1.41 },
{ "time": 0.4, "x": 0, "y": 0 }
]
},
"rear_bracer": {
"rotate": [
{ "time": 0, "angle": -30.47 }
],
"translate": [
{
"time": 0,
"x": 0,
"y": 0,
"curve": [ 0, 0.3, 0.679, 1 ]
},
{ "time": 0.3, "x": -6, "y": -3.72 },
{ "time": 0.4, "x": 0, "y": 0 }
]
},
"rear_upper_arm": {
"rotate": [
{ "time": 0, "angle": 62.31 }
],
"translate": [
{
"time": 0,
"x": 0,
"y": 0,
"curve": [ 0, 0.3, 0.679, 1 ]
},
{ "time": 0.3, "x": 2.81, "y": 11.42 },
{ "time": 0.4, "x": 0, "y": 0 }
]
},
"aiming gun target": {
"translate": [
{ "time": 0, "x": -0.07, "y": -10.4 }
]
}
},
"ik": {
"aiming constraint": [
{ "time": 0 }
],
"aiming gun constraint": [
{ "time": 0 }
]
}
},
"test": {
"slots": {
"front_foot": {
"color": [
{ "time": 0.6667, "color": "0000803e", "curve": "stepped" },
{ "time": 1.3333, "color": "0000803e" }
]
},
"gun": {
"color": [
{ "time": 0, "color": "0000803e", "curve": "stepped" },
{ "time": 0.6667, "color": "0000803e" },
{ "time": 1.3333, "color": "c9c8483e" }
]
},
"rear_foot": {
"color": [
{ "time": 0.6667, "color": "0000803e", "curve": "stepped" },
{ "time": 1.3333, "color": "0000803e" }
]
}
},
"bones": {
"head": {
"rotate": [
{ "time": 0, "angle": 0 },
{ "time": 0.3333, "angle": -20.72 },
{ "time": 0.6667, "angle": -32.42 },
{ "time": 1, "angle": -5.3 },
{ "time": 1.3333, "angle": 24.96 },
{ "time": 1.6667, "angle": 15.62 },
{ "time": 2, "angle": 0 }
],
"translate": [
{
"time": 0,
"x": 0,
"y": 0,
"curve": [ 0.173, 0.38, 0.575, 0.74 ]
},
{
"time": 0.1667,
"x": 144.2,
"y": -77.59,
"curve": [ 0.372, 0.61, 0.766, 1 ]
},
{
"time": 0.3333,
"x": 217.61,
"y": -192.64,
"curve": [ 0.282, 0, 0.625, 0.32 ]
},
{
"time": 0.5,
"x": 181.21,
"y": -365.66,
"curve": [ 0.314, 0.21, 0.655, 0.54 ]
},
{
"time": 0.6667,
"x": 20.1,
"y": -500.41,
"curve": [ 0.147, 0.28, 0.75, 1 ]
},
{ "time": 0.8333, "x": -194.24, "y": -341.85 },
{ "time": 1, "x": -307.93, "y": -114 },
{
"time": 1.1667,
"x": -330.39,
"y": 121.42,
"curve": [ 0.25, 0, 0.764, 0.49 ]
},
{
"time": 1.3333,
"x": -240.42,
"y": 335.66,
"curve": [ 0.23, 0.37, 0.58, 0.73 ]
},
{
"time": 1.5,
"x": -56.12,
"y": 288.06,
"curve": [ 0.296, 0.61, 0.642, 1 ]
},
{
"time": 1.6667,
"x": 87.63,
"y": 191.34,
"curve": [ 0.239, 0, 0.627, 0.39 ]
},
{
"time": 1.8333,
"x": 60.62,
"y": 95.15,
"curve": [ 0.41, 0.26, 0.804, 0.62 ]
},
{ "time": 2, "x": 0, "y": 0 }
]
}
},
"drawOrder": [
{
"time": 0.6667,
"offsets": [
{ "slot": "head", "offset": -9 },
{ "slot": "eye", "offset": -9 },
{ "slot": "mouth", "offset": -13 },
{ "slot": "goggles", "offset": -13 }
]
},
{ "time": 1.3333 }
],
"events": [
{ "time": 0, "name": "headPop", "int": 0, "float": 0, "string": "pop.wav" },
{ "time": 1, "name": "headBehind", "int": 7, "float": 8, "string": "animate" },
{ "time": 2, "name": "headAttach", "int": 0, "float": 0, "string": "attach.wav" }
]
},
"walk": {
"slots": {
"front_fist": {

View File

@ -15,8 +15,20 @@ MonoBehaviour:
- {fileID: 11400000, guid: b4b8457d6cb8fec49a40be5b71d79e51, type: 2}
scale: 0.01
skeletonJSON: {fileID: 4900000, guid: e3b64d7eaf0de4e45a00b7065166554d, type: 3}
fromAnimation: []
toAnimation: []
duration: []
defaultMix: 0.15
fromAnimation:
- run
- pole
- idle
- hit
toAnimation:
- pole
- run
- hit
- idle
duration:
- 0
- 0
- 0.05
- 0.05
defaultMix: 0.1
controller: {fileID: 0}

View File

Before

Width:  |  Height:  |  Size: 585 KiB

After

Width:  |  Height:  |  Size: 585 KiB

View File

@ -0,0 +1,33 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: spineboy_Material Fill
m_Shader: {fileID: 4800000, guid: 45495790b394f894a967dbf44489b57b, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 49bb65eefe08e424bbf7a38bc98ec638, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- PixelSnap: 0
- _CloakPhase: 0
- _Cutoff: 0.1
- _FillPhase: 0
- _RefractionStrength: 0.01
- _node_3476: 0
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _FillColor: {r: 1, g: 1, b: 1, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 128e02fa6a4f5964fa898757a425b354
timeCreated: 1489559535
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -25,7 +25,9 @@ Material:
- PixelSnap: 0
- _CloakPhase: 0
- _Cutoff: 0.1
- _FillPhase: 0
- _RefractionStrength: 0.01
- _node_3476: 0
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _FillColor: {r: 1, g: 1, b: 1, a: 1}

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

View File

@ -0,0 +1,92 @@
fileFormatVersion: 2
guid: f5fff1b5caee03642ab77c9984b4bb6a
timeCreated: 1497479335
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
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: 2
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: Standalone
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: Android
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: WebGL
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -36,19 +36,16 @@ namespace Spine.Unity.Editor {
[CustomEditor(typeof(SkeletonAnimator))]
[CanEditMultipleObjects]
public class SkeletonAnimatorInspector : SkeletonRendererInspector {
protected SerializedProperty layerMixModes;
protected SerializedProperty autoReset;
protected SerializedProperty mecanimTranslator;
protected override void OnEnable () {
base.OnEnable();
autoReset = serializedObject.FindProperty("autoReset");
layerMixModes = serializedObject.FindProperty("layerMixModes");
mecanimTranslator = serializedObject.FindProperty("mecanimTranslator");
}
protected override void DrawInspectorGUI (bool multi) {
base.DrawInspectorGUI(multi);
EditorGUILayout.PropertyField(autoReset);
EditorGUILayout.PropertyField(layerMixModes, true);
EditorGUILayout.PropertyField(mecanimTranslator, true);
}
}
}

View File

@ -64,6 +64,7 @@ namespace Spine.Unity.Editor {
public static Texture2D mesh;
public static Texture2D weights;
public static Texture2D path;
public static Texture2D clipping;
public static Texture2D skin;
public static Texture2D skinsRoot;
public static Texture2D animation;
@ -85,39 +86,46 @@ namespace Spine.Unity.Editor {
public static Texture2D unity;
// public static Texture2D controllerIcon;
static Texture2D LoadIcon (string filename) {
return (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/" + filename);
}
public static void Initialize () {
skeleton = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-skeleton.png");
nullBone = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-null.png");
bone = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-bone.png");
poseBones = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-poseBones.png");
boneNib = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-boneNib.png");
slot = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-slot.png");
slotRoot = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-slotRoot.png");
skinPlaceholder = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-skinPlaceholder.png");
skeleton = LoadIcon("icon-skeleton.png");
nullBone = LoadIcon("icon-null.png");
bone = LoadIcon("icon-bone.png");
poseBones = LoadIcon("icon-poseBones.png");
boneNib = LoadIcon("icon-boneNib.png");
slot = LoadIcon("icon-slot.png");
slotRoot = LoadIcon("icon-slotRoot.png");
skinPlaceholder = LoadIcon("icon-skinPlaceholder.png");
genericAttachment = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-attachment.png");
image = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-image.png");
boundingBox = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-boundingBox.png");
mesh = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-mesh.png");
weights = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-weights.png");
skin = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-skin.png");
skinsRoot = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-skinsRoot.png");
animation = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-animation.png");
animationRoot = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-animationRoot.png");
spine = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-spine.png");
userEvent = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-event.png");
constraintNib = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-constraintNib.png");
genericAttachment = LoadIcon("icon-attachment.png");
image = LoadIcon("icon-image.png");
boundingBox = LoadIcon("icon-boundingBox.png");
mesh = LoadIcon("icon-mesh.png");
weights = LoadIcon("icon-weights.png");
path = LoadIcon("icon-path.png");
clipping = LoadIcon("icon-clipping.png");
constraintRoot = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-constraints.png");
constraintTransform = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-constraintTransform.png");
constraintPath = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-constraintPath.png");
constraintIK = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-constraintIK.png");
skin = LoadIcon("icon-skin.png");
skinsRoot = LoadIcon("icon-skinsRoot.png");
animation = LoadIcon("icon-animation.png");
animationRoot = LoadIcon("icon-animationRoot.png");
spine = LoadIcon("icon-spine.png");
userEvent = LoadIcon("icon-event.png");
constraintNib = LoadIcon("icon-constraintNib.png");
constraintRoot = LoadIcon("icon-constraints.png");
constraintTransform = LoadIcon("icon-constraintTransform.png");
constraintPath = LoadIcon("icon-constraintPath.png");
constraintIK = LoadIcon("icon-constraintIK.png");
warning = LoadIcon("icon-warning.png");
skeletonUtility = LoadIcon("icon-skeletonUtility.png");
hingeChain = LoadIcon("icon-hingeChain.png");
subMeshRenderer = LoadIcon("icon-subMeshRenderer.png");
warning = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-warning.png");
skeletonUtility = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-skeletonUtility.png");
hingeChain = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-hingeChain.png");
subMeshRenderer = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-subMeshRenderer.png");
path = (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/icon-path.png");
info = EditorGUIUtility.FindTexture("console.infoicon.sml");
unity = EditorGUIUtility.FindTexture("SceneAsset Icon");
@ -125,15 +133,17 @@ namespace Spine.Unity.Editor {
}
public static Texture2D GetAttachmentIcon (Attachment attachment) {
// Analysis disable once CanBeReplacedWithTryCastAndCheckForNull
if (attachment is RegionAttachment)
return Icons.image;
// Analysis disable once CanBeReplacedWithTryCastAndCheckForNull
else if (attachment is MeshAttachment)
return ((MeshAttachment)attachment).IsWeighted() ? Icons.weights : Icons.mesh;
else if (attachment is BoundingBoxAttachment)
return Icons.boundingBox;
else if (attachment is PathAttachment)
return Icons.path;
else if (attachment is ClippingAttachment)
return Icons.clipping;
else
return Icons.warning;
}

View File

@ -30,8 +30,6 @@
// Contributed by: Mitch Thompson
//#define FLIPDEBUG
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
@ -42,14 +40,6 @@ namespace Spine.Unity.Modules {
static Transform parentSpaceHelper;
#region Inspector
#if FLIPDEBUG
[Header("DEBUG")]
public bool flipXInitially;
public bool flipYInitially;
public bool spawnKinematic;
public bool disableUpdateBones;
#endif
[Header("Hierarchy")]
[SpineBone]
public string startingBoneName = "";
@ -94,20 +84,12 @@ namespace Spine.Unity.Modules {
IEnumerator Start () {
if (parentSpaceHelper == null) {
parentSpaceHelper = (new GameObject("Parent Space Helper")).transform;
#if !FLIPDEBUG
parentSpaceHelper.hideFlags = HideFlags.HideInHierarchy;
#endif
}
targetSkeletonComponent = GetComponent<SkeletonRenderer>() as ISkeletonAnimation;
if (targetSkeletonComponent == null) Debug.LogError("Attached Spine component does not implement ISkeletonAnimation. This script is not compatible.");
skeleton = targetSkeletonComponent.Skeleton;
#if FLIPDEBUG
skeleton.flipX = flipXInitially;
skeleton.flipY = flipYInitially;
#endif
if (applyOnStart) {
yield return null;
Apply();
@ -144,9 +126,6 @@ namespace Spine.Unity.Modules {
RecursivelyCreateBoneProxies(startingBone);
RootRigidbody = boneTable[startingBone].GetComponent<Rigidbody2D>();
#if FLIPDEBUG
if (!RootRigidbody.isKinematic)
#endif
RootRigidbody.isKinematic = pinStartBone;
RootRigidbody.mass = rootMass;
var boneColliders = new List<Collider2D>();
@ -324,20 +303,12 @@ namespace Spine.Unity.Modules {
var rb = boneGameObject.AddComponent<Rigidbody2D>();
rb.gravityScale = this.gravityScale;
#if FLIPDEBUG
rb.isKinematic = spawnKinematic;
#endif
foreach (Bone child in b.Children)
RecursivelyCreateBoneProxies(child);
}
/// <summary>Performed every skeleton animation update to translate Unity Transforms positions into Spine bone transforms.</summary>
void UpdateSpineSkeleton (ISkeletonAnimation animatedSkeleton) {
#if FLIPDEBUG
if (disableUpdateBones) return;
#endif
bool flipX = skeleton.flipX;
bool flipY = skeleton.flipY;
bool flipXOR = flipX ^ flipY;

View File

@ -37,9 +37,6 @@ namespace Spine.Unity {
[RequireComponent(typeof(Animator))]
public class SkeletonAnimator : SkeletonRenderer, ISkeletonAnimation {
public enum MixMode { AlwaysMix, MixNext, SpineStyle }
public MixMode[] layerMixModes = new MixMode[0];
#region Bone Callbacks (ISkeletonAnimation)
protected event UpdateBonesDelegate _UpdateLocal;
protected event UpdateBonesDelegate _UpdateWorld;
@ -63,29 +60,40 @@ namespace Spine.Unity {
public event UpdateBonesDelegate UpdateComplete { add { _UpdateComplete += value; } remove { _UpdateComplete -= value; } }
#endregion
public class SpineMecanimTranslator {
public bool AutoReset {
get { return mecanimTranslator.autoReset; }
set { mecanimTranslator.autoReset = value; }
}
[System.Serializable]
public class MecanimTranslator {
#region Inspector
public bool autoReset = true;
public MixMode[] layerMixModes = new MixMode[0];
#endregion
public enum MixMode { AlwaysMix, MixNext, SpineStyle }
readonly Dictionary<int, Spine.Animation> animationTable = new Dictionary<int, Spine.Animation>();
readonly Dictionary<AnimationClip, int> clipNameHashCodeTable = new Dictionary<AnimationClip, int>();
readonly List<Animation> previousAnimations = new List<Animation>();
Animator animator;
List<Animation> previousAnimations = new List<Animation>();
public bool autoReset = true;
public void Initialize (Animator animator, SkeletonDataAsset skeletonDataAsset) {
this.animator = animator;
animationTable.Clear();
clipNameHashCodeTable.Clear();
var data = skeletonDataAsset.GetSkeletonData(true);
foreach (var a in data.Animations)
animationTable.Add(a.Name.GetHashCode(), a);
animationTable.Add(a.Name.GetHashCode(), a);
}
public void Apply (Skeleton skeleton, ref MixMode[] layerMixModes) {
public void Apply (Skeleton skeleton) {
if (layerMixModes.Length < animator.layerCount)
System.Array.Resize<MixMode>(ref layerMixModes, animator.layerCount);
//skeleton.Update(Time.deltaTime); // Doesn't actually do anything, currently. (Spine 3.5).
//skeleton.Update(Time.deltaTime); // Doesn't actually do anything, currently. (Spine 3.6).
// Clear Previous
if (autoReset) {
@ -138,7 +146,7 @@ namespace Spine.Unity {
// Always use Mix instead of Applying the first non-zero weighted clip.
for (int c = 0; c < clipInfo.Length; c++) {
var info = clipInfo[c]; float weight = info.weight * layerWeight; if (weight == 0) continue;
animationTable[NameHashCode(info.clip)].Apply(skeleton, 0, AnimationTime(stateInfo.normalizedTime, info.clip.length, stateInfo.loop, stateInfo.speed <0), stateInfo.loop, null, weight, MixPose.Current, MixDirection.In);
animationTable[NameHashCode(info.clip)].Apply(skeleton, 0, AnimationTime(stateInfo.normalizedTime, info.clip.length, stateInfo.loop, stateInfo.speed < 0), stateInfo.loop, null, weight, MixPose.Current, MixDirection.In);
}
if (hasNext) {
for (int c = 0; c < nextClipInfo.Length; c++) {
@ -151,13 +159,13 @@ namespace Spine.Unity {
int c = 0;
for (; c < clipInfo.Length; c++) {
var info = clipInfo[c]; float weight = info.weight * layerWeight; if (weight == 0) continue;
animationTable[NameHashCode(info.clip)].Apply(skeleton, 0, AnimationTime(stateInfo.normalizedTime, info.clip.length, stateInfo.loop, stateInfo.speed <0), stateInfo.loop, null, 1f, MixPose.Current, MixDirection.In);
animationTable[NameHashCode(info.clip)].Apply(skeleton, 0, AnimationTime(stateInfo.normalizedTime, info.clip.length, stateInfo.loop, stateInfo.speed < 0), stateInfo.loop, null, 1f, MixPose.Current, MixDirection.In);
break;
}
// Mix the rest
for (; c < clipInfo.Length; c++) {
var info = clipInfo[c]; float weight = info.weight * layerWeight; if (weight == 0) continue;
animationTable[NameHashCode(info.clip)].Apply(skeleton, 0, AnimationTime(stateInfo.normalizedTime, info.clip.length, stateInfo.loop, stateInfo.speed <0), stateInfo.loop, null, weight, MixPose.Current, MixDirection.In);
animationTable[NameHashCode(info.clip)].Apply(skeleton, 0, AnimationTime(stateInfo.normalizedTime, info.clip.length, stateInfo.loop, stateInfo.speed < 0), stateInfo.loop, null, weight, MixPose.Current, MixDirection.In);
}
c = 0;
@ -206,21 +214,21 @@ namespace Spine.Unity {
}
}
public SpineMecanimTranslator translator;
public MecanimTranslator mecanimTranslator;
public override void Initialize (bool overwrite) {
if (valid && !overwrite) return;
base.Initialize(overwrite);
if (!valid) return;
translator = new SpineMecanimTranslator();
translator.Initialize(GetComponent<Animator>(), this.skeletonDataAsset);
mecanimTranslator = mecanimTranslator ?? new MecanimTranslator();
mecanimTranslator.Initialize(GetComponent<Animator>(), this.skeletonDataAsset);
}
public void Update () {
if (!valid) return;
translator.Apply(skeleton, ref layerMixModes);
mecanimTranslator.Apply(skeleton);
// UpdateWorldTransform and Bone Callbacks
{