基础内容
必要插件安装 缓动曲线和动画基础 ElementFolder,Track与其次级模块,PathNode重构
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
using MoreMountains.Feedbacks;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace MoreMountains.Feel
|
||||
{
|
||||
/// <summary>
|
||||
/// This class handles Feel's MMSequencer demo scene, detecting input and starting/stopping its target sequencer
|
||||
/// </summary>
|
||||
[AddComponentMenu("")]
|
||||
public class MMSequencerDemoManager : MonoBehaviour
|
||||
{
|
||||
[Header("Sequence")]
|
||||
/// the feedback sequencer to pilot when pressing the ActionKey
|
||||
public MMFeedbacksSequencer TargetSequencer;
|
||||
|
||||
/// <summary>
|
||||
/// On Update we detect input
|
||||
/// </summary>
|
||||
protected virtual void Update()
|
||||
{
|
||||
HandleInput();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Every frame we check if input was pressed
|
||||
/// </summary>
|
||||
protected virtual void HandleInput()
|
||||
{
|
||||
if (FeelDemosInputHelper.CheckMainActionInputPressedThisFrame())
|
||||
{
|
||||
Toggle();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Turns the sequencer on or off based on its current state
|
||||
/// </summary>
|
||||
protected virtual void Toggle()
|
||||
{
|
||||
if (TargetSequencer.Playing)
|
||||
{
|
||||
TargetSequencer.StopSequence();
|
||||
}
|
||||
else
|
||||
{
|
||||
TargetSequencer.PlaySequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf43e98c2e64a1c44b22aabeb44cd7ee
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user