namespace Fusion.Addons.InterestManagement
{
using System.Collections.Generic;
using UnityEngine;
public interface IInterestProvider
{
///
/// Reference to Transform component.
///
Transform Transform { get; }
///
/// Version used for tracking object state and releasing references.
///
int Version { get; }
///
/// Defines order in which interest providers are processed. Provider with lower value will be processed first.
///
int SortOrder { get; }
///
/// Defines processing behavior of interest provider.
///
/// - Default - Interest from this provider is processed additively to existing interest.
/// - Override - Interest from this provider overrides all existing interest.
///
///
EInterestMode InterestMode { get; }
///
/// Mark all active registrations (including global) of this provider as invalid.
/// Use this method to prevent further processing of this provider.
/// Called automatically on despawn.
///
void Release();
///
/// Register other interest provider to self, allowing to create hierarchy of interest providers.
/// Registered providers are processed only if the player is interested in this provider.
///
/// Reference to interest provider.
/// How long the interest provider stays registered.
bool RegisterProvider(IInterestProvider interestProvider, float duration = 0.0f);
///
/// Unregister other interest provider from self.
///
/// Reference to interest provider.
/// If true, the interest provider is unregistered recursively from all registered interest providers.
bool UnregisterProvider(IInterestProvider interestProvider, bool recursive);
///
/// Add all valid registered interest providers to the set of unique providers.
///
/// Set of interest providers that will be filled.
/// If true, registered interest providers are processed recursively.
void GetProviders(InterestProviderSet interestProviders, bool recursive);
///
/// Returns whether this provider should be processed for given player.
///
/// Player interest view with player information used for filtering.
bool IsPlayerInterested(PlayerInterestView playerView);
///
/// Add interest providers that are relevant to the player.
///
/// Player interest view used for filtering.
/// Interest providers set that will be filled.
/// Indicates whether registered interest providers should be iterated recursively.
void GetProvidersForPlayer(PlayerInterestView playerView, InterestProviderSet interestProviders, bool recursive);
///
/// Add interest cells that are relevant to the player.
/// This method typically converts custom list of InterestShape objects to cells, using InterestShape.GetCells().
///
/// Player interest view used for filtering.
/// Interest cells that will be set.
void GetCellsForPlayer(PlayerInterestView playerView, HashSet cells);
///
/// Called when an object with PlayerInterestManager component is selected.
///
/// Provides player information when PlayerInterestManager component is selected.
void DrawGizmosForPlayer(PlayerInterestView playerView);
}
}