using System;
using System.Collections.Generic;
using FishNet.Connection;
using GameKit.Dependencies.Utilities;
using UnityEngine;
namespace FishNet.Object
{
public partial class NetworkObject : MonoBehaviour
{
///
/// Level of detail levels for observers.
///
/// This collection will be empty of this NetworkObject does not utilize level of detail.
internal Dictionary ObserverLevelOfDetailDivisors;
///
/// True if level of detail has been initialized, indicating it can be used.
///
internal bool ServerIsLevelOfDetailInitialized { get; private set; }
///
/// True if LocalLevelOfDetailCalculationType is set to close only.
///
internal bool IsLocalReconcileLODCloseObjectsOnly => _localLevelOfDetailCalculationType == LocalReconcileLODCalculationType.CloseObjectsOnly;
///
/// How local reconciles are applied when using level of detail, specifically when the server had not sent a reconcile.
///
[Tooltip("How local reconciles are applied when using level of detail calculations, specifically when the server had not sent a reconcile.")]
[SerializeField]
private LocalReconcileLODCalculationType _localLevelOfDetailCalculationType = LocalReconcileLODCalculationType.CloseObjectsOnly;
///
/// True if to enable level of detail for this object. Level of detail supports prediction objects. This feature must be enabled on the ObserverManager to function.
///
internal bool UseLevelOfDetail => _useLevelOfDetail;
[Tooltip("True if to enable level of detail for this object. Level of detail supports prediction objects. This feature must be enabled on the ObserverManager to function.")]
[SerializeField]
private bool _useLevelOfDetail = false;
///
/// True to use the same level of detail as the topmost parent NetworkObject. False to use a separate level of detail if nested.
///
[Tooltip("True to use the same level of detail as the topmost parent NetworkObject. False to use a separate level of detail if nested.")]
[SerializeField]
private bool _useRootLevelOfDetail = true;
///
/// Default level of detail index for new observers.
///
internal const byte DEFAULT_LEVEL_OF_DETAIL_INDEX = 1;
///
/// Updates the level of detail status based on current conditions.
///
private void SetLevelOfDetailUsage()
{
}
///
/// Called ObserversActive has changed.
///
private void ObserversActiveChanged_LevelOfDetail()
{
}
///
/// Clears observers for level of detail.
///
private void ClearObserverLevelOfDetail()
{
}
///
/// Adds an observer to level of detail if needed.
///
/// A connection is only added if this object supports level of detail.
private void AddObserverLevelOfDetail(NetworkConnection connection)
{
}
///
/// Removes an observer from level of detail if needed.
///
private void RemoveObserverLevelOfDetail(NetworkConnection connection)
{
}
}
}