You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
923 B

using CoreGame;
namespace GAS.Runtime
{
public class CameraShakeCue : GameplayCueInstant
{
public float duration = 0.3f;
public string path = "Assets/GAS_Setting/Cam/CritShake.asset";
public override GameplayCueInstantSpec CreateSpec(in GameplayCueParameters param)
{
var spec = SptPool<CameraShakeCueSpec>.Malloc();
spec.Awake(param);
return spec;
}
public override void FreeSpec(ref GameplayCueInstantSpec spec)
{
var cameraShakeCueSpec = spec as CameraShakeCueSpec;
SptPool<CameraShakeCueSpec>.Free(ref cameraShakeCueSpec);
spec = null;
}
}
public class CameraShakeCueSpec : GameplayCueInstantSpec<CameraShakeCue>
{
public override void Trigger()
{
Contexts.Combat.ReplaceCameraShake(cue.duration, cue.path);
}
}
}