![]() |
Project Arrhythmia
A video game developed by Vitamin Games.
|
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() |
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.
| 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.
|
private |
This function is used to calculate the offset of the camera based on certain game parameters.
| 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.
|
private |
Initialize the hue events.
| eventObjectTmp | This is the keyframes associated with this event. |
|
private |
Initialize the player events. This currently only handles the player gravity events.
| eventObjectTmp | This is the keyframes associated with this event. |
| 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.
| eventObjectTmp | A reference to the list of event keyframes. |
| 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.
| eventObjectTmp | A reference to the list of event keyframes. |
| 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:
| _time | Time the trigger is executing at. Used in the case of the event needs that info. |
| _event | The event type to trigger. |
| _data | A list of string values that hold needed data / info for the event to use. |
|
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.
| grainIntensity | The new intensity for the camera's grain effect. |
|
private |
Update the colored grain of the camera.
| _colored |
|
private |
Update the grain size of the camera.
| _size |
|
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.
| centerX | The new horizontal center position for the camera's vignette effect. |
|
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.
| centerY | The new vertical center position for the camera's vignette effect. |
|
private |
Update the orthographic size of the camera.
| zoom | The float to change the zoom to. |
| void EventManager.updateEvents | ( | int | _type | ) |
Update all the events. Clearing and reinstantiating them.
| _type | The event type you want to update. |
|
private |
Update the theme of the game by lerping between the old and new theme.
| _themeData | Contains the old / new theme as well as the lerp value. |
| List<Sequence> EventManager.eventSequences |
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.