Thomas ICHÉ
6 年前
当前提交
e6dad733
共有 3 个文件被更改,包括 138 次插入 和 32 次删除
-
101Runtime/Rigs/DirectorControlRig.cs
-
58Runtime/Actions/DirectorControlRigAction.cs
-
11Runtime/Actions/DirectorControlRigAction.cs.meta
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine.Timeline; |
|||
using GameplayIngredients.Rigs; |
|||
|
|||
namespace GameplayIngredients.Actions |
|||
{ |
|||
public class DirectorControlRigAction : ActionBase |
|||
{ |
|||
[NonNullCheck] |
|||
public DirectorControlRig directorControlRig; |
|||
|
|||
[Header("Play Mode")] |
|||
public bool SetPlayMode = true; |
|||
public DirectorControlRig.PlayMode PlayMode = DirectorControlRig.PlayMode.Play; |
|||
|
|||
[Header("Wrap Mode")] |
|||
public bool SetWrapMode = false; |
|||
public DirectorControlRig.WrapMode WrapMode = DirectorControlRig.WrapMode.Loop; |
|||
|
|||
[Header("Time")] |
|||
public bool SetTime = false; |
|||
public float Time = 0.0f; |
|||
|
|||
public bool SetStopTime = false; |
|||
public float StopTime = 1.0f; |
|||
|
|||
[Header("Timeline Asset")] |
|||
public bool SetTimeline = false; |
|||
public TimelineAsset TimelineAsset; |
|||
|
|||
public override void Execute(GameObject instigator = null) |
|||
{ |
|||
if (directorControlRig == null) |
|||
{ |
|||
Debug.LogWarning("No DirectorControlRig set, ignoring Call", this.gameObject); |
|||
return; |
|||
} |
|||
|
|||
if (SetTime) |
|||
directorControlRig.time = Time; |
|||
|
|||
if (SetPlayMode) |
|||
directorControlRig.playMode = PlayMode; |
|||
|
|||
if (SetWrapMode) |
|||
directorControlRig.wrapMode = WrapMode; |
|||
|
|||
if (SetStopTime) |
|||
directorControlRig.stopTime = StopTime; |
|||
|
|||
if (SetTimeline) |
|||
directorControlRig.timeline = TimelineAsset; |
|||
|
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 46a9752b2a3792a46b8a16cf93bafdd5 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue