50 lines
2.1 KiB
C#
50 lines
2.1 KiB
C#
using System;
|
|
using UnityEngine;
|
|
using UnityEngine.Video;
|
|
|
|
namespace OctoCore.Transitions
|
|
{
|
|
/// <summary>
|
|
/// Contract for a scene-transition visual effect (eyelid blink, plain fade, etc.).
|
|
/// Lives inside the OctoCore package and has zero dependency on any concrete
|
|
/// implementation or third-party tweening library. OctoNavigation only ever
|
|
/// talks to this interface, never to a concrete type.
|
|
/// </summary>
|
|
public interface IOctoSceneTransition
|
|
{
|
|
/// <summary>True while a transition sequence is currently animating.</summary>
|
|
bool IsBusy { get; }
|
|
|
|
/// <summary>
|
|
/// Assigns the visual content (clip/material) to use for the next CloseEyes() call.
|
|
/// Pass a null clip for a plain transition with no video overlay.
|
|
/// </summary>
|
|
void SetClip(VideoClip clip, Material material);
|
|
|
|
/// <summary>
|
|
/// Enables or disables the eyelid/video layer swap for the next CloseEyes()/OpenEyes()
|
|
/// sequence, if the implementation supports it. Implementations that don't support
|
|
/// layer swapping can treat this as a no-op.
|
|
/// </summary>
|
|
void SetLayerSwapEnabled(bool enabled);
|
|
|
|
/// <summary>Closes the transition over the given duration and invokes the callback on completion.</summary>
|
|
void CloseEyes(float duration, Action onComplete);
|
|
|
|
/// <summary>Opens the transition over the given duration and invokes the callback on completion.</summary>
|
|
void OpenEyes(float duration, Action onComplete);
|
|
|
|
/// <summary>Stops and hides any video overlay currently playing.</summary>
|
|
void HideVideo();
|
|
|
|
/// <summary>Reveals the video overlay after the given delay, if a clip is assigned.</summary>
|
|
void ShowVideoAfterDelay(float delay);
|
|
|
|
/// <summary>
|
|
/// Hides the video overlay after the given delay. Lets a caller make the video
|
|
/// disappear partway through the opening animation instead of only once it has
|
|
/// fully finished.
|
|
/// </summary>
|
|
void HideVideoAfterDelay(float delay);
|
|
}
|
|
} |