您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

33 行
955 B

using GameplayIngredients;
using GameplayIngredients.Actions;
using UnityEngine;
public class ConfigureShakeAction : ActionBase
{
public bool ShakeEnabled = false;
public float Attenuation = 0.5f;
public float MinDelay = 0.5f;
public float MaxDelay = 1.7f;
public ShakeManager.Settings MinSettings = new ShakeManager.Settings
{
Intensity = 0.1f,
Position = Vector3.one * -32.0f
};
public ShakeManager.Settings MaxSettings = new ShakeManager.Settings
{
Intensity = 1.0f,
Position = Vector3.one * 32.0f
};
public override void Execute(GameObject instigator = null)
{
var manager = Manager.Get<ShakeManager>();
manager.ShakeEnabled = ShakeEnabled;
manager.Attenuation = Attenuation;
manager.MinDelay = MinDelay;
manager.MaxDelay = MaxDelay;
manager.MinSettings = MinSettings;
manager.MaxSettings = MaxSettings;
}
}