Max Animator/Animation Demo

This commit is contained in:
max 2019-10-31 20:15:27 +01:00
parent e7e1816efd
commit f27d46f6f6
6 changed files with 70 additions and 50 deletions

View file

@ -2,17 +2,7 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="c6a8ca49-0b91-43c0-a787-44b1fda29c5f" name="Default Changelist" comment="implement FFT waterfall">
<change afterPath="$PROJECT_DIR$/Assets/Animations/Cube.controller" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/Animations/Cube.controller.meta" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/Animations/OrangeBoxAnimation1.anim" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/Animations/OrangeBoxAnimation1.anim.meta" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/Scenes/Examples/MIDI/script/OrangeCubeScript.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Assets/Scenes/Examples/MIDI/script/OrangeCubeScript.cs.meta" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.UnityProject/.idea/contentModel.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.UnityProject/.idea/contentModel.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.UnityProject/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.UnityProject/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assembly-CSharp-Editor.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/Assembly-CSharp-Editor.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assembly-CSharp.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/Assembly-CSharp.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/VideoInput/Editor.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scenes/Examples/MIDI/script/OrangeCubeScript.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scenes/Examples/MIDI/script/OrangeCubeScript.cs" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />

View file

@ -40,7 +40,7 @@ AnimatorController:
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_DefaultBool: 1
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5

View file

@ -0,0 +1,53 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: OrangeBoxAnimation2
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings: []
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves: []
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c1938f62b68f6194abc7b87ad61115d1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -573,7 +573,6 @@ GameObject:
- component: {fileID: 1261823485}
- component: {fileID: 1261823483}
- component: {fileID: 1261823484}
- component: {fileID: 1261823486}
m_Layer: 0
m_Name: PdBackend
m_TagString: Untagged
@ -763,22 +762,6 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1261823486
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1261823479}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f5f9defef7af2514590dadc0a6cddbac, type: 3}
m_Name:
m_EditorClassIdentifier:
loopLengthInBeat: 4
loopStarted:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1843145352}
m_MethodName: Go
m_Mode: 1
@ -1062,8 +1045,8 @@ GameObject:
- component: {fileID: 1843145350}
- component: {fileID: 1843145349}
- component: {fileID: 1843145348}
- component: {fileID: 1843145347}
- component: {fileID: 1843145352}
- component: {fileID: 1843145347}
m_Layer: 0
m_Name: OrangeCube
m_TagString: Untagged
@ -1175,7 +1158,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1c7a7999eb739ac4f8c70171bc778922, type: 3}
m_Name:
m_EditorClassIdentifier:
go: 0
anim: {fileID: 1843145347}
--- !u!1 &2001732970
GameObject:
m_ObjectHideFlags: 0

View file

@ -2,29 +2,15 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace cylvester
{
public class OrangeCubeScript : MonoBehaviour
{
public bool go;
private Animator anim;
void Start()
{
anim = GetComponent<Animator>();
}
[SerializeField] private Animator anim;
public void Go()
{
go = true;
}
private void Update()
{
if (go == true)
{
gameObject.GetComponent<Animator>().SetTrigger("AnimTrigger");
anim.SetTrigger("AnimTrigger");
}
}
}