refactor: change Raindrop.Bootstrap's namespace

This commit is contained in:
alexiscatnip
2022-08-06 02:43:06 +08:00
committed by alexiscatnip
parent 1940b06d60
commit 11f566072a
22 changed files with 28 additions and 40 deletions
-1
View File
@@ -4,7 +4,6 @@ using OpenMetaverse;
using OpenMetaverse.Assets;
using Plugins.CommonDependencies;
using Raindrop;
using Raindrop.Services.Bootstrap;
using UnityEngine;
using Animation = UnityEngine.Animation;
using Logger = OpenMetaverse.Logger;
+2 -4
View File
@@ -1,10 +1,8 @@
using System;
using System.Threading;
using OpenMetaverse.Rendering;
using OpenMetaverse.Rendering;
using Plugins.ObjectPool;
using UnityEngine;
namespace Raindrop.Services.Bootstrap
namespace Raindrop.Bootstrap
{
public class Globals : MonoBehaviour
{
@@ -1,9 +1,9 @@
using System;
using Plugins.CommonDependencies;
using Plugins.CommonDependencies;
using Raindrop.Services;
using UnityEngine;
using UnityEngine.Assertions;
namespace Raindrop.Services.Bootstrap
namespace Raindrop.Bootstrap
{
//maintain the impression of "persistence" of the connection
// on app is running:
@@ -9,15 +9,19 @@ using UnityEngine.SceneManagement;
using UnityScripts.Disk;
using Logger = OpenMetaverse.Logger;
namespace Raindrop.Services.Bootstrap
namespace Raindrop.Bootstrap
{
//This sets up and tears down the raindrop instance service.
// inspired by https://medium.com/medialesson/simple-service-locator-for-your-unity-project-40e317aad307
// This sets up and tears down the raindrop instance service.
//Just attach this script as a component of the game manager. You don't need anything else, unless you want the UI.
// To use,
// Just attach this script as a component of a gameobject in bootstrap
// scene.
// Then, you can disable/enable UI-scene loading using the boolean
// Disable UI scene loading for headless tests
public class RaindropBootstrapper : MonoBehaviour
{
[SerializeField] public bool startUI = false;
[SerializeField] public bool startUI;
private void Awake()
{
@@ -107,7 +111,7 @@ namespace Raindrop.Services.Bootstrap
Quit_Application();
}
// globally- accessible quit method.
// globally-accessible quit method.
public void Quit_Application()
{
void SaveInventoryToDiskAndLogout(RaindropInstance raindropInstance, RaindropNetcom raindropNetcom)
@@ -178,6 +182,5 @@ namespace Raindrop.Services.Bootstrap
instance.CleanUp();
}
}
}
+2 -3
View File
@@ -1,10 +1,9 @@
using System.Collections.Generic;
using Raindrop.Presenters;
using Raindrop.Presenters;
using Raindrop.UI.LoadingScreen;
using Raindrop.UI.Views;
using UnityEngine;
namespace Raindrop.Services.Bootstrap
namespace Raindrop.Bootstrap
{
//this class is in the main scene, where you can give it references to monobehaviors in order to inject them.
// of course, runtime- created monobehaviors cannot be injected this way, so you will need to find some other way for those.
@@ -1,8 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine;
namespace Raindrop.Services.Bootstrap
namespace Raindrop.Bootstrap
{
[CreateAssetMenu]
public class TextureCollection : ScriptableObject
+3 -3
View File
@@ -1,10 +1,10 @@
using Plugins.CommonDependencies;
using Raindrop.Map.Model;
using Raindrop.Netcom;
using Raindrop.Services;
using UnityEngine;
using UnityEngine.Serialization;
namespace Raindrop.Services.Bootstrap
namespace Raindrop.Bootstrap
{
// link all the UI together
class UIBootstrapper : MonoBehaviour
@@ -12,7 +12,7 @@ namespace Raindrop.Services.Bootstrap
private RaindropInstance instance => ServiceLocator.Instance.Get<RaindropInstance>();
private RaindropNetcom netcom => instance.Netcom;
[FormerlySerializedAs("Injector")] [SerializeField] public References references;
[SerializeField] public References references;
// bootstraps the UI.
// 1. it first bootstraps the base layer of RaindropInstance
// 2. then it find all the canvasmanager and modal managers.
-1
View File
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using OpenMetaverse;
using Raindrop.Services.Bootstrap;
namespace Raindrop
{
+1 -1
View File
@@ -9,8 +9,8 @@ using OpenMetaverse.Imaging;
using OpenMetaverse.Rendering;
using Plugins.CommonDependencies;
using Plugins.ObjectPool;
using Raindrop.Bootstrap;
using Raindrop.Render;
using Raindrop.Services.Bootstrap;
using UniRx.Toolkit;
using UE = UnityEngine ;
using UnityEngine ;
+1 -1
View File
@@ -1,5 +1,5 @@
using OpenMetaverse;
using Raindrop.Services.Bootstrap;
using Raindrop.Bootstrap;
using UnityEngine;
using UnityEngine.Serialization;
using Logger = UnityEngine.Logger;
@@ -7,7 +7,6 @@ using OpenMetaverse.Imaging;
using Plugins.CommonDependencies;
using Plugins.ObjectPool;
using Raindrop;
using Raindrop.Services.Bootstrap;
using UnityEngine;
using Logger = OpenMetaverse.Logger;
+1 -1
View File
@@ -2,8 +2,8 @@
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using Plugins.CommonDependencies;
using Raindrop.Bootstrap;
using Raindrop.Netcom;
using Raindrop.Services.Bootstrap;
namespace Raindrop.UI.Login
{
@@ -4,7 +4,6 @@ using OpenMetaverse.Assets;
using Plugins.CommonDependencies;
using Raindrop;
using Raindrop.Netcom;
using Raindrop.Services.Bootstrap;
public class LandmarkController : IDisposable
{
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Diagnostics;
using FMOD;
using OpenMetaverse;
using Raindrop.Services.Bootstrap;
using Raindrop.UI.views;
using TMPro;
using UniRx;
@@ -2,7 +2,6 @@
using System.Threading;
using OpenMetaverse;
using Plugins.CommonDependencies;
using Raindrop.Services.Bootstrap;
using TMPro;
using UnityEngine;
@@ -2,7 +2,6 @@ using System.Collections.Generic;
using Plugins.CommonDependencies;
using Raindrop;
using Raindrop.Services;
using Raindrop.Services.Bootstrap;
using UnityEngine;
using UnityEngine.Serialization;
using Object = System.Object;
@@ -12,9 +12,9 @@ using UnityEngine;
using Object = System.Object;
using System.Text.RegularExpressions;
using Plugins.CommonDependencies;
using Raindrop.Bootstrap;
using Raindrop.Core;
using Raindrop.Services;
using Raindrop.Services.Bootstrap;
using Raindrop.UI.chat.printer_component;
using Logger = OpenMetaverse.Logger;
@@ -5,7 +5,6 @@ using Plugins.CommonDependencies;
using Raindrop.Netcom;
using Raindrop.Presenters;
using Raindrop.Services;
using Raindrop.Services.Bootstrap;
using UnityEngine;
using Logger = OpenMetaverse.Logger;
@@ -3,7 +3,7 @@ using OpenMetaverse;
using OpenMetaverse.Rendering;
using Plugins.CommonDependencies;
using Raindrop;
using Raindrop.Services.Bootstrap;
using Raindrop.Bootstrap;
using UnityEngine;
using ObjectManager = Raindrop.Presenters.ObjectManager;
using Vector3 = OpenMetaverse.Vector3;
-1
View File
@@ -4,7 +4,6 @@ using UnityEngine;
using System.IO;
using Plugins.ObjectPool;
using Raindrop;
using Raindrop.Services.Bootstrap;
using UnityEngine.UI;
// An implementation of rawimage view. Attach to GO that has rawimage.
@@ -3,7 +3,6 @@ using Raindrop.Rendering;
using System.Collections.Generic;
using System.Threading;
using Plugins.CommonDependencies;
using Raindrop.Services.Bootstrap;
using UE = UnityEngine ;
using UnityEngine ;
@@ -1,7 +1,7 @@
using System.Collections;
using NUnit.Framework;
using Plugins.CommonDependencies;
using Raindrop.Services.Bootstrap;
using Raindrop.Bootstrap;
using UnityEngine;
using UnityEngine.SceneManagement;