Merge branch '3.8' into 3.9-beta

This commit is contained in:
Harald Csaszar 2020-03-10 12:43:49 +01:00
commit d67b3a9ccb
29 changed files with 363 additions and 25 deletions

View File

@ -164,7 +164,7 @@ GameObject:
- component: {fileID: 320097520}
- component: {fileID: 320097519}
m_Layer: 0
m_Name: play mode
m_Name: Description play mode bottom
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -192,7 +192,8 @@ TextMesh:
m_GameObject: {fileID: 320097517}
m_Text: 'Enter <b>PLAY MODE</b> in Unity to see Spineboy animate.
Try moving, jumping and shooting. (WASD+Spacebar+Left Click, or XBOX Controller)'
Try moving, jumping, aiming and shooting. (WASD+Spacebar+Left&Right Click, or
XBOX Controller)'
m_OffsetZ: 0
m_CharacterSize: 0.12
m_LineSpacing: 1
@ -350,8 +351,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: af38a3de26ed9b84abc2fe7c7f3b209d, type: 2}
initialSkinName:
initialFlipX: 0
initialFlipY: 0
separatorSlotNames: []
@ -386,7 +387,7 @@ MeshRenderer:
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_Materials:
- {fileID: 2100000, guid: 1455e88fdb81ccc45bdeaedd657bad4d, type: 2}
- {fileID: 2100000, guid: f89bbf05902e77242a3ad20f3c927353, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
@ -442,11 +443,12 @@ MonoBehaviour:
m_EditorClassIdentifier:
model: {fileID: 299828574}
skeletonAnimation: {fileID: 816033310}
run: {fileID: 11400000, guid: 2d841d20c203ff24a859b8c73f9c3817, type: 2}
idle: {fileID: 11400000, guid: 8a71ad90c9e356d4fa476a420aeb259d, type: 2}
shoot: {fileID: 11400000, guid: 6d4c548ed1818024bb6ed2ee16dbfc40, type: 2}
jump: {fileID: 11400000, guid: 69a6ea3cadcdebb44a8c3b5fa43880e7, type: 2}
footstepEvent: {fileID: 11400000, guid: 2657d9f265aa59446b055dc0c1018419, type: 2}
run: {fileID: 11400000, guid: d1297f325bf69cc49a8bcea4220abfed, type: 2}
idle: {fileID: 11400000, guid: 1002b1f05d1a2f94ab4ed89c14969f2f, type: 2}
aim: {fileID: 11400000, guid: 64d274c85f55c6446a74f25d5c7a2a7b, type: 2}
shoot: {fileID: 11400000, guid: 29de7da3aa10f4047bb89d253e6cf3af, type: 2}
jump: {fileID: 11400000, guid: 8bb8b27ff0842d64da0838b636c45e6b, type: 2}
footstepEvent: {fileID: 11400000, guid: 910b84ab2bcf7cc428f4a27a81bbe44b, type: 2}
footstepPitchOffset: 0.2
gunsoundPitchOffset: 0.13
footstepSource: {fileID: 1858851856}
@ -465,7 +467,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
skeletonAnimation: {fileID: 816033310}
boneName: shoot target
boneName: crosshair
cam: {fileID: 611702905}
--- !u!1 &1090490184
GameObject:
@ -605,6 +607,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
horizontalAxis: Horizontal
attackButton: Fire1
aimButton: Fire2
jumpButton: Jump
model: {fileID: 299828574}
--- !u!4 &1147196157
@ -740,7 +743,7 @@ GameObject:
- component: {fileID: 1447233441}
- component: {fileID: 1447233440}
m_Layer: 0
m_Name: Description
m_Name: Description top
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -843,7 +846,7 @@ GameObject:
m_Component:
- component: {fileID: 1573724995}
m_Layer: 0
m_Name: LABELS
m_Name: Description
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -1062,9 +1065,9 @@ GameObject:
serializedVersion: 5
m_Component:
- component: {fileID: 2088845777}
- component: {fileID: 2088845780}
- component: {fileID: 2088845779}
- component: {fileID: 2088845778}
- component: {fileID: 2088845779}
- component: {fileID: 2088845780}
m_Layer: 0
m_Name: PARTICLES Gun
m_TagString: Untagged
@ -1079,7 +1082,7 @@ Transform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2088845776}
m_LocalRotation: {x: 0, y: 0, z: 0.08045987, w: 0.99675786}
m_LocalPosition: {x: 2.917376, y: 3.743913, z: 0}
m_LocalPosition: {x: 2.8367755, y: 2.7568526, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 816033313}
@ -1097,7 +1100,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
skeletonRenderer: {fileID: 816033310}
boneName: gunTip
boneName: gun-tip
followXYPosition: 1
followZPosition: 0
followBoneRotation: 0
@ -1203,7 +1206,7 @@ ParticleSystem:
moveWithTransform: 1
moveWithCustomTransform: {fileID: 0}
scalingMode: 1
randomSeed: 823379790
randomSeed: 255519693
InitialModule:
serializedVersion: 3
enabled: 1
@ -4367,7 +4370,7 @@ GameObject:
- component: {fileID: 2111197922}
- component: {fileID: 2111197921}
m_Layer: 0
m_Name: New Sprite
m_Name: Black bar
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

View File

@ -35,6 +35,7 @@ namespace Spine.Unity.Examples {
#region Inspector
public string horizontalAxis = "Horizontal";
public string attackButton = "Fire1";
public string aimButton = "Fire2";
public string jumpButton = "Jump";
public SpineboyBeginnerModel model;
@ -54,6 +55,11 @@ namespace Spine.Unity.Examples {
if (Input.GetButton(attackButton))
model.TryShoot();
if (Input.GetButtonDown(aimButton))
model.StartAim();
if (Input.GetButtonUp(aimButton))
model.StopAim();
if (Input.GetButtonDown(jumpButton))
model.TryJump();
}

View File

@ -47,6 +47,8 @@ namespace Spine.Unity.Examples {
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.
public event System.Action StartAimEvent; // Lets other scripts know when Spineboy is aiming.
public event System.Action StopAimEvent; // Lets other scripts know when Spineboy is no longer aiming.
#region API
public void TryJump () {
@ -62,6 +64,14 @@ namespace Spine.Unity.Examples {
}
}
public void StartAim () {
if (StartAimEvent != null) StartAimEvent(); // Fire the "StartAimEvent" event.
}
public void StopAim () {
if (StopAimEvent != null) StopAimEvent(); // Fire the "StopAimEvent" event.
}
public void TryMove (float speed) {
currentSpeed = speed; // show the "speed" in the Inspector.

View File

@ -39,7 +39,7 @@ namespace Spine.Unity.Examples {
public SpineboyBeginnerModel model;
public SkeletonAnimation skeletonAnimation;
public AnimationReferenceAsset run, idle, shoot, jump;
public AnimationReferenceAsset run, idle, aim, shoot, jump;
public EventDataReferenceAsset footstepEvent;
[Header("Audio")]
@ -56,6 +56,8 @@ namespace Spine.Unity.Examples {
void Start () {
if (skeletonAnimation == null) return;
model.ShootEvent += PlayShoot;
model.StartAimEvent += StartPlayingAim;
model.StopAimEvent += StopPlayingAim;
skeletonAnimation.AnimationState.Event += HandleEvent;
}
@ -121,17 +123,37 @@ namespace Spine.Unity.Examples {
#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;
var shootTrack = skeletonAnimation.AnimationState.SetAnimation(1, shoot, false);
shootTrack.AttachmentThreshold = 1f;
shootTrack.MixDuration = 0f;
var empty1 = skeletonAnimation.state.AddEmptyAnimation(1, 0.5f, 0.1f);
empty1.AttachmentThreshold = 1f;
// Play the aim animation on track 2 to aim at the mouse target.
var aimTrack = skeletonAnimation.AnimationState.SetAnimation(2, aim, false);
aimTrack.AttachmentThreshold = 1f;
aimTrack.MixDuration = 0f;
var empty2 = skeletonAnimation.state.AddEmptyAnimation(2, 0.5f, 0.1f);
empty2.AttachmentThreshold = 1f;
gunSource.pitch = GetRandomPitch(gunsoundPitchOffset);
gunSource.Play();
//gunParticles.randomSeed = (uint)Random.Range(0, 100);
gunParticles.Play();
}
public void StartPlayingAim () {
// Play the aim animation on track 2 to aim at the mouse target.
var aimTrack = skeletonAnimation.AnimationState.SetAnimation(2, aim, true);
aimTrack.AttachmentThreshold = 1f;
aimTrack.MixDuration = 0f;
}
public void StopPlayingAim () {
var empty2 = skeletonAnimation.state.AddEmptyAnimation(2, 0.5f, 0.1f);
empty2.AttachmentThreshold = 1f;
}
public void Turn (bool facingLeft) {
skeletonAnimation.Skeleton.ScaleX = facingLeft ? -1f : 1f;
// Maybe play a transient turning animation too, then call ChangeStableAnimation.

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 48916516246bd8a4dbaa0cc88eb9b64e
folderAsset: yes
timeCreated: 1583837494
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
%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: 6e3e95a05e4c9774397eeeb7bdee8ccb, type: 3}
m_Name: aim
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: af38a3de26ed9b84abc2fe7c7f3b209d, type: 2}
animationName: aim

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 64d274c85f55c6446a74f25d5c7a2a7b
timeCreated: 1583837494
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
%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: 6e3e95a05e4c9774397eeeb7bdee8ccb, type: 3}
m_Name: death
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: af38a3de26ed9b84abc2fe7c7f3b209d, type: 2}
animationName: death

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 2fc7c0a2c0179cc4395b7e3ffeb7e550
timeCreated: 1583837494
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
%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: 8e60be42c1473144db0fd3337c25b500, type: 3}
m_Name: footstep
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: af38a3de26ed9b84abc2fe7c7f3b209d, type: 2}
eventName: footstep

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 910b84ab2bcf7cc428f4a27a81bbe44b
timeCreated: 1583837875
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
%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: 6e3e95a05e4c9774397eeeb7bdee8ccb, type: 3}
m_Name: hoverboard
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: af38a3de26ed9b84abc2fe7c7f3b209d, type: 2}
animationName: hoverboard

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: ce9fe65c3c501f14780aaa35b779ef10
timeCreated: 1583837495
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
%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: 6e3e95a05e4c9774397eeeb7bdee8ccb, type: 3}
m_Name: idle-turn
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: af38a3de26ed9b84abc2fe7c7f3b209d, type: 2}
animationName: idle-turn

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8bad3b43d554cd142a8d5069b19164d8
timeCreated: 1583837495
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
%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: 6e3e95a05e4c9774397eeeb7bdee8ccb, type: 3}
m_Name: idle
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: af38a3de26ed9b84abc2fe7c7f3b209d, type: 2}
animationName: idle

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 1002b1f05d1a2f94ab4ed89c14969f2f
timeCreated: 1583837495
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
%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: 6e3e95a05e4c9774397eeeb7bdee8ccb, type: 3}
m_Name: jump
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: af38a3de26ed9b84abc2fe7c7f3b209d, type: 2}
animationName: jump

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8bb8b27ff0842d64da0838b636c45e6b
timeCreated: 1583837495
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
%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: 6e3e95a05e4c9774397eeeb7bdee8ccb, type: 3}
m_Name: portal
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: af38a3de26ed9b84abc2fe7c7f3b209d, type: 2}
animationName: portal

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 236a057973e35034caeab3af14ae807b
timeCreated: 1583837495
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
%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: 6e3e95a05e4c9774397eeeb7bdee8ccb, type: 3}
m_Name: run-to-idle
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: af38a3de26ed9b84abc2fe7c7f3b209d, type: 2}
animationName: run-to-idle

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: c47abd93ce75ae44193ebd8edd1b18c5
timeCreated: 1583837496
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
%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: 6e3e95a05e4c9774397eeeb7bdee8ccb, type: 3}
m_Name: run
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: af38a3de26ed9b84abc2fe7c7f3b209d, type: 2}
animationName: run

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: d1297f325bf69cc49a8bcea4220abfed
timeCreated: 1583837496
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
%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: 6e3e95a05e4c9774397eeeb7bdee8ccb, type: 3}
m_Name: shoot
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: af38a3de26ed9b84abc2fe7c7f3b209d, type: 2}
animationName: shoot

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 29de7da3aa10f4047bb89d253e6cf3af
timeCreated: 1583837496
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
%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: 6e3e95a05e4c9774397eeeb7bdee8ccb, type: 3}
m_Name: walk
m_EditorClassIdentifier:
skeletonDataAsset: {fileID: 11400000, guid: af38a3de26ed9b84abc2fe7c7f3b209d, type: 2}
animationName: walk

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 39ecdbeedb5b3d84f8200d046b44a1e6
timeCreated: 1583837496
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant: