Project Arrhythmia
A video game developed by Vitamin Games.
Loading...
Searching...
No Matches
EventManager Class Reference

This class manages various visual effects in the game. More...

+ Inheritance diagram for EventManager:

Public Member Functions

float GetCameraZoom ()
 This function is used to get the current camera zoom level.
 
void SetJiggle ()
 
bool isFirstKeyframe (int _index)
 
bool isLastKeyframe (int _index, int _count)
 
void InitPositionEvents (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 This function initializes the position events.
 
void InitZoomEvents (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 This function initializes the zoom events.
 
void InitRotEvents (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 
void InitThemeEvents (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 
void InitBaseEffectKeyframes (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 This function initializes the base effect keyframes.
 
void InitLimitedEffectKeyframes (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 
void InitFullEffectKeyframes (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 
void InitKeyframes ()
 Initialize all the keyframes for the events. Depending on the settings, it will do more or less effects.
 
void updateEvents (int _type)
 Update all the events. Clearing and reinstantiating them.
 
void updateEvents ()
 Do a quick update without clean up.
 
void TriggerEvent (Vector2 _time, DataManager.GameData.BeatmapData.EventTriggers.EventType _event, List< string > _data)
 This is used to trigger all events in the level. Triggers are a special type of event that can be made by the level creator in the game's editor.
 

Public Attributes

float camZoom = 20
 
float prevCamZoom
 
float camRot = 0f
 
float camChroma = 0f
 
float camBloom = 0f
 
float camBloomDiffusion = 0f
 
int camBloomColor = 9
 
Vector2 CamPos = Vector2.zero
 
Vector3 CamPlayerJiggleLast = Vector2.zero
 
Vector3 CamPlayerJiggle = Vector2.zero
 
float CamJiggleAmount = 1
 
float vignetteIntensity = 0f
 
float vignetteSmoothness = 0f
 
float vignetteRounded = 0f
 
float vignetteRoundness = 0f
 
Vector2 vignetteCenter = Vector2.zero
 
int vignetteColor = 0
 
float lensDistortIntensity = 0f
 
float lensDistortCenterX = 0.5f
 
float lensDistortCenterY = 0.5f
 
float grainIntensity = 0f
 
float grainColored = 0f
 
float grainSize = 0f
 
float lumContrib = 1f
 
float gradientIntensity = 0
 
float gradientRotation = 0
 
int gradientMode = 0
 
float glitchIntensity = 0
 
float glitchWidth = 0.88f
 
float glitchSpeed = 0
 
float hueValue = 0
 
float overrideShakeMult
 
float shakeMult
 
Vector3 shakeVector
 
List< Sequence > eventSequences
 This list stores all the event sequences in the game.
 
Sequence shakeSequence
 
Vector2 Gravity = Vector2.zero
 

Static Public Attributes

static EventManager inst
 

Properties

bool changedZoom [get]
 

Private Member Functions

void Awake ()
 
Vector3 GetCamOffset ()
 This function is used to calculate the offset of the camera based on certain game parameters.
 
void Update ()
 
bool GetHasJiggle ()
 
void LateUpdate ()
 
void InitShakeEvents (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 
void InitVignetteEvents (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 
void InitChromaEvents (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 
void InitBloomEvents (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 
void InitLensEvents (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 
void InitGrainEvents (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 
void InitGradientEvents (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 
void InitGlitchEvents (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 
void InitHueEvents (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 Initialize the hue events.
 
void InitPlayerEvents (ref List< DataManager.GameData.EventKeyframes > eventObjectTmp)
 Initialize the player events. This currently only handles the player gravity events.
 
void updateShake ()
 
void updateTheme (DataManager.ThemeUpdater _themeData)
 Update the theme of the game by lerping between the old and new theme.
 
void updateCameraZoom (float _zoom)
 Update the orthographic size of the camera.
 
void updateCameraRotation (float _rot)
 
void updateCameraChromatic (float _chroma)
 
void updateCameraVignette (float _vignette)
 
void updateCameraVignetteSmoothness (float _vignette)
 
void updateCameraVignetteRounded (float _vignette)
 
void updateCameraVignetteCenterX (float _vignette)
 This function updates the horizontal center position of the camera's vignette effect. It takes a float value representing the new horizontal center position and applies it to the camera's vignette effect.
 
void updateCameraVignetteCenterY (float _vignette)
 This function updates the vertical center position of the camera's vignette effect. It takes a float value representing the new vertical center position and applies it to the camera's vignette effect.
 
void updateCameraGrain (float _intensity)
 This function updates the grain effect of the camera. It takes a float value representing the new intensity of the grain effect and applies it to the camera.
 
void updateCameraGrainColored (float _colored)
 Update the colored grain of the camera.
 
void updateCameraGrainSize (float _size)
 Update the grain size of the camera.
 

Private Attributes

bool HasJiggle = true
 

Static Private Attributes

static ThemeUpdaterDotweenPlugin customThemeUpdaterPlugin = new ThemeUpdaterDotweenPlugin()
 

Detailed Description

This class manages various visual effects in the game.

It is a singleton class that provides access to camera zoom, rotation, chromatic aberration, and bloom effects. The class exposes several public properties that can be manipulated to change these effects. The changedZoom property is a special case that checks if the camera zoom level has changed since the last frame.

Member Function Documentation

◆ GetCameraZoom()

float EventManager.GetCameraZoom ( )

This function is used to get the current camera zoom level.

If the editor is currently in editing mode, it tries to return the camera zoom level plus the CamZoomOffset defined in the editor settings. If it fails to get the CamZoomOffset (for example, if the editor settings are not properly initialized), it simply returns the current camera zoom level. If the editor is not in editing mode, it also returns the current camera zoom level.

Returns
The current camera zoom level, possibly adjusted by the CamZoomOffset if in editing mode.

◆ GetCamOffset()

Vector3 EventManager.GetCamOffset ( )
private

This function is used to calculate the offset of the camera based on certain game parameters.

Returns
The calculated offset for the camera.

◆ InitBaseEffectKeyframes()

void EventManager.InitBaseEffectKeyframes ( ref List< DataManager::GameData::EventKeyframes > eventObjectTmp)

This function initializes the base effect keyframes.

It is responsible for setting up the initial state of the base effect keyframes in the game.

◆ InitHueEvents()

void EventManager.InitHueEvents ( ref List< DataManager::GameData::EventKeyframes > eventObjectTmp)
private

Initialize the hue events.

Parameters
eventObjectTmpThis is the keyframes associated with this event.

◆ InitPlayerEvents()

void EventManager.InitPlayerEvents ( ref List< DataManager::GameData::EventKeyframes > eventObjectTmp)
private

Initialize the player events. This currently only handles the player gravity events.

Parameters
eventObjectTmpThis is the keyframes associated with this event.

◆ InitPositionEvents()

void EventManager.InitPositionEvents ( ref List< DataManager::GameData::EventKeyframes > eventObjectTmp)

This function initializes the position events.

It takes a reference to a list of EventKeyframes and sorts them in ascending order based on their time. It then iterates over each keyframe, and if the keyframe is not active, it marks it as active and processes it.

Parameters
eventObjectTmpA reference to the list of event keyframes.

◆ InitZoomEvents()

void EventManager.InitZoomEvents ( ref List< DataManager::GameData::EventKeyframes > eventObjectTmp)

This function initializes the zoom events.

It takes a reference to a list of EventKeyframes and sorts them in ascending order based on their time. It then iterates over each keyframe, and if the keyframe is not active, it marks it as active and processes it.

Parameters
eventObjectTmpA reference to the list of event keyframes.

◆ TriggerEvent()

void EventManager.TriggerEvent ( Vector2 _time,
DataManager::GameData::BeatmapData::EventTriggers::EventType _event,
List< string > _data )

This is used to trigger all events in the level. Triggers are a special type of event that can be made by the level creator in the game's editor.

Usage:

TriggerEvent(0.5f, DataManager.GameData.BeatmapData.EventTriggers.EventType.Player_Bubble, new List<string> { "Hello World" });
A beatmap's event trigger settings.
Definition DataManager.cs:2583
Stores all the beatmapData for a level.
Definition DataManager.cs:2560
Definition DataManager.cs:1677
Definition DataManager.cs:21
void TriggerEvent(Vector2 _time, DataManager.GameData.BeatmapData.EventTriggers.EventType _event, List< string > _data)
This is used to trigger all events in the level. Triggers are a special type of event that can be mad...
Definition EventManager.cs:1904
Parameters
_timeTime the trigger is executing at. Used in the case of the event needs that info.
_eventThe event type to trigger.
_dataA list of string values that hold needed data / info for the event to use.

◆ updateCameraGrain()

void EventManager.updateCameraGrain ( float _intensity)
private

This function updates the grain effect of the camera. It takes a float value representing the new intensity of the grain effect and applies it to the camera.

Parameters
grainIntensityThe new intensity for the camera's grain effect.

◆ updateCameraGrainColored()

void EventManager.updateCameraGrainColored ( float _colored)
private

Update the colored grain of the camera.

Parameters
_colored

◆ updateCameraGrainSize()

void EventManager.updateCameraGrainSize ( float _size)
private

Update the grain size of the camera.

Parameters
_size

◆ updateCameraVignetteCenterX()

void EventManager.updateCameraVignetteCenterX ( float _vignette)
private

This function updates the horizontal center position of the camera's vignette effect. It takes a float value representing the new horizontal center position and applies it to the camera's vignette effect.

Parameters
centerXThe new horizontal center position for the camera's vignette effect.

◆ updateCameraVignetteCenterY()

void EventManager.updateCameraVignetteCenterY ( float _vignette)
private

This function updates the vertical center position of the camera's vignette effect. It takes a float value representing the new vertical center position and applies it to the camera's vignette effect.

Parameters
centerYThe new vertical center position for the camera's vignette effect.

◆ updateCameraZoom()

void EventManager.updateCameraZoom ( float _zoom)
private

Update the orthographic size of the camera.

Parameters
zoomThe float to change the zoom to.

◆ updateEvents()

void EventManager.updateEvents ( int _type)

Update all the events. Clearing and reinstantiating them.

Parameters
_typeThe event type you want to update.

◆ updateTheme()

void EventManager.updateTheme ( DataManager::ThemeUpdater _themeData)
private

Update the theme of the game by lerping between the old and new theme.

Parameters
_themeDataContains the old / new theme as well as the lerp value.

Member Data Documentation

◆ eventSequences

List<Sequence> EventManager.eventSequences
Initial value:
= new List<Sequence>() {
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
}

This list stores all the event sequences in the game.

Each element in the list is an EventSequence object, the index is the type of event.


The documentation for this class was generated from the following file: