Table of Contents

Class Effects

Namespace
Squiggles.Core.Data
Assembly
SquigglesCommon4X.dll

A singleton for managing juicy effects. Also handles the settings for reducing discomfort from certain effects. i.e. a player can disable screen shake if it affects them.

public static class Effects
Inheritance
Effects
Inherited Members

Fields

FILE_PATH

private const string FILE_PATH = "effects.json"

Field Value

string

Properties

MaxRumbleDuration

The maximum rumble allowed for rumbling controllers (clamped)

public static float MaxRumbleDuration { get; set; }

Property Value

float

MaxScreenShakeDuration

The maximum amount of screen shake allowed.

public static float MaxScreenShakeDuration { get; set; }

Property Value

float

RumbleStrength

The default strength at which to rumble controllers at

public static float RumbleStrength { get; set; }

Property Value

float

ScreenShakeStrength

The default strength at which the screen shakes

public static float ScreenShakeStrength { get; set; }

Property Value

float

Methods

Load()

public static void Load()

Rumble(float, float, float, int)

public static void Rumble(float strong, float weak, float duration = 0.1, int controller_id = -1)

Parameters

strong float
weak float
duration float
controller_id int

SaveSettings()

public static void SaveSettings()

Shake(float, float, float)

Triggers a screen shake

public static void Shake(float speed, float strength, float duration)

Parameters

speed float

the speed at which to shake (higher means faster side to side)

strength float

the strength at which to shake (higher means shaking moves the camera further

duration float

the duration of time in seconds to perform this screen shake

Events

RequestScreenShake

Event for when screen shake is requested. Parameters are: speed, strength, duration. Strength and Duration are adjusted to meet the settings of the user.

public static event Action<float, float, float> RequestScreenShake

Event Type

Action<float, float, float>