Fade camera net event
This commit is contained in:
@@ -29,14 +29,15 @@ function setLocalPlayerControlState(controlState, cursorState = false) {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function fadeLocalCamera(state, time) {
|
function fadeLocalCamera(state, duration, colour) {
|
||||||
if (isFadeCameraSupported()) {
|
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Fading camera ${(state) ? "in" : "out"} for ${time}ms`);
|
||||||
logToConsole(LOG_DEBUG, `[AGRP.Utilities] Fading camera ${(state) ? "in" : "out"} for ${time} seconds`);
|
|
||||||
|
|
||||||
if (isFadeCameraSupported()) {
|
cameraFadeDuration = duration;
|
||||||
game.fadeCamera(state, time);
|
cameraFadeStart = sdl.ticks;
|
||||||
}
|
cameraFadeEnabled = true;
|
||||||
}
|
cameraFadeIn = state;
|
||||||
|
cameraFadeColour = colour;
|
||||||
|
cameraFadeAlpha = (state) ? 255 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user