Skip to content

Commit

Permalink
refactor: Pascal cased NetworkSceneProgress
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoTenPvP committed Apr 16, 2019
1 parent e32c658 commit 9183da1
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions MLAPI/SceneManagement/SceneSwitchProgress.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using UnityEngine;
using AsyncOperation = UnityEngine.AsyncOperation;

namespace MLAPI.SceneManagement
{
Expand Down Expand Up @@ -28,11 +30,23 @@ public class SceneSwitchProgress
/// <summary>
/// Is this scene switch progresses completed, all clients are done loading the scene or a timeout has occured.
/// </summary>
public bool isCompleted { get; private set; }
public bool IsCompleted { get; private set; }
/// <summary>
/// Is this scene switch progresses completed, all clients are done loading the scene or a timeout has occured.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Use IsCompleted instead", false)]
public bool isCompleted => IsCompleted;
/// <summary>
/// If all clients are done loading the scene, at the moment of completed.
/// </summary>
public bool IsAllClientsDoneLoading { get; private set; }
/// <summary>
/// If all clients are done loading the scene, at the moment of completed.
/// </summary>
public bool isAllClientsDoneLoading { get; private set; }
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Use IsCompleted instead", false)]
public bool isAllClientsDoneLoading => IsAllClientsDoneLoading;
/// <summary>
/// Delegate type for when a client is done loading the scene.
/// </summary>
Expand Down Expand Up @@ -74,10 +88,10 @@ internal void SetSceneLoadOperation(AsyncOperation sceneLoadOperation)

internal void CheckCompletion()
{
if (!isCompleted && DoneClients.Count == NetworkingManager.Singleton.ConnectedClientsList.Count && sceneLoadOperation.isDone)
if (!IsCompleted && DoneClients.Count == NetworkingManager.Singleton.ConnectedClientsList.Count && sceneLoadOperation.isDone)
{
isCompleted = true;
isAllClientsDoneLoading = true;
IsCompleted = true;
IsAllClientsDoneLoading = true;
NetworkSceneManager.sceneSwitchProgresses.Remove(guid);
if (OnComplete != null)
OnComplete.Invoke(false);
Expand All @@ -88,9 +102,9 @@ internal void CheckCompletion()

internal void SetTimedOut()
{
if (!isCompleted)
if (!IsCompleted)
{
isCompleted = true;
IsCompleted = true;
NetworkSceneManager.sceneSwitchProgresses.Remove(guid);
if (OnComplete != null)
OnComplete.Invoke(true);
Expand Down

0 comments on commit 9183da1

Please sign in to comment.