浏览代码

File cleanup and relocation

/main
Ciro Continisio 3 年前
当前提交
36d16456
共有 11 个文件被更改,包括 72 次插入147 次删除
  1. 115
      UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity
  2. 2
      UOP1_Project/Assets/Scripts/Events/ScriptableObjects/UI/FadeChannelSO.cs
  3. 6
      UOP1_Project/Assets/Scripts/UI/FadeController.cs
  4. 27
      UOP1_Project/Assets/Scripts/UI/LoadingInterfaceController.cs
  5. 17
      UOP1_Project/Assets/Scripts/UI/UISpinner.cs
  6. 33
      UOP1_Project/Assets/Scripts/SceneManagement/LoadingScreenManager.cs
  7. 19
      UOP1_Project/Assets/Scripts/SceneManagement/SpinningUI.cs
  8. 0
      /UOP1_Project/Assets/Scripts/UI/FadeController.cs.meta
  9. 0
      /UOP1_Project/Assets/Scripts/UI/FadeController.cs
  10. 0
      /UOP1_Project/Assets/Scripts/UI/LoadingInterfaceController.cs.meta
  11. 0
      /UOP1_Project/Assets/Scripts/UI/UISpinner.cs.meta

115
UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity


m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &363619425
RectTransform:
m_ObjectHideFlags: 0

m_Children:
- {fileID: 841012434}
m_Father: {fileID: 1387982343}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 363619424}
m_CullTransparentMesh: 0
--- !u!1 &447650313
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 447650316}
- component: {fileID: 447650314}
m_Layer: 0
m_Name: GameExitListener
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &447650314
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 447650313}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0ba826e9d52310a43b98dffc289c71b2, type: 3}
m_Name:
m_EditorClassIdentifier:
_channel: {fileID: 11400000, guid: d570e16f713770a4a94310999866e0e0, type: 2}
OnEventRaised:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName:
m_MethodName: ExitGame
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!4 &447650316
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 447650313}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &610459580
GameObject:
m_ObjectHideFlags: 0

_masterVolume: 1
_musicVolume: 0.8
_sfxVolume: 1
--- !u!1 &624605538
--- !u!1 &740063860
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}

m_Component:
- component: {fileID: 624605539}
- component: {fileID: 624605540}
m_Layer: 5
m_Name: LoadingInterfaceManager
- component: {fileID: 740063862}
- component: {fileID: 740063861}
m_Layer: 0
m_Name: LoadingInterfaceController
--- !u!224 &624605539
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 624605538}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1387982343}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &624605540
--- !u!114 &740063861
m_GameObject: {fileID: 624605538}
m_GameObject: {fileID: 740063860}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 66ced4c879634014997808cfc063a88a, type: 3}

type: 2}
loadingInterface: {fileID: 363619424}
--- !u!4 &740063862
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 740063860}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &819074216
PrefabInstance:
m_ObjectHideFlags: 0

- component: {fileID: 1122701838}
- component: {fileID: 1122701837}
m_Layer: 0
m_Name: FadeManager
m_Name: FadeController
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 624605539}
- {fileID: 565765817888297794}
- {fileID: 363619425}
m_Father: {fileID: 0}

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1387982343}
m_RootOrder: 1
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}

2
UOP1_Project/Assets/Scripts/Events/ScriptableObjects/UI/FadeChannelSO.cs


}
/// <summary>
/// Generic fade function. Communicates with <seealso cref="FadeManager.cs"/>.
/// Generic fade function. Communicates with <seealso cref="FadeController.cs"/>.
/// </summary>
/// <param name="fadeIn">If true, the rectangle fades in. If false, the rectangle fades out.</param>
/// <param name="duration">How long it takes to the image to fade in/out.</param>

6
UOP1_Project/Assets/Scripts/UI/FadeController.cs


using System.Collections;
using UnityEngine;
using UnityEngine;
using System;
public class FadeManager : MonoBehaviour
public class FadeController : MonoBehaviour
{
[SerializeField] private FadeChannelSO _fadeChannelSO;
[SerializeField] private Image _imageComponent;

27
UOP1_Project/Assets/Scripts/UI/LoadingInterfaceController.cs


using UnityEngine;
public class LoadingInterfaceController : MonoBehaviour
{
[Header("Loading screen Event")]
//The loading screen event we are listening to
[SerializeField] private BoolEventChannelSO _ToggleLoadingScreen = default;
[Header("Loading screen ")]
public GameObject loadingInterface;
private void OnEnable()
{
_ToggleLoadingScreen.OnEventRaised += ToggleLoadingScreen;
}
private void OnDisable()
{
_ToggleLoadingScreen.OnEventRaised -= ToggleLoadingScreen;
}
private void ToggleLoadingScreen(bool state)
{
loadingInterface.SetActive(state);
}
}

17
UOP1_Project/Assets/Scripts/UI/UISpinner.cs


using UnityEngine;
public class UISpinner : MonoBehaviour
{
[SerializeField] private float _rotateSpeed = -150f;
private RectTransform rectComponent;
private void Start()
{
rectComponent = GetComponent<RectTransform>();
}
private void Update()
{
rectComponent.Rotate(0f, 0f, _rotateSpeed * Time.deltaTime);
}
}

33
UOP1_Project/Assets/Scripts/SceneManagement/LoadingScreenManager.cs


using UnityEngine;
public class LoadingScreenManager : MonoBehaviour
{
[Header("Loading screen Event")]
//The loading screen event we are listening to
[SerializeField] private BoolEventChannelSO _ToggleLoadingScreen = default;
[Header("Loading screen ")]
public GameObject loadingInterface;
private void OnEnable()
{
if (_ToggleLoadingScreen != null)
{
_ToggleLoadingScreen.OnEventRaised += ToggleLoadingScreen;
}
}
private void OnDisable()
{
if (_ToggleLoadingScreen != null)
{
_ToggleLoadingScreen.OnEventRaised -= ToggleLoadingScreen;
}
}
private void ToggleLoadingScreen(bool state)
{
loadingInterface.SetActive(state);
}
}

19
UOP1_Project/Assets/Scripts/SceneManagement/SpinningUI.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SpinningUI : MonoBehaviour
{
private RectTransform rectComponent;
public float rotateSpeed = 200f;
private void Start()
{
rectComponent = GetComponent<RectTransform>();
}
private void Update()
{
rectComponent.Rotate(0f, 0f, rotateSpeed * Time.deltaTime);
}
}

/UOP1_Project/Assets/Scripts/UI/FadeManager.cs.meta → /UOP1_Project/Assets/Scripts/UI/FadeController.cs.meta

/UOP1_Project/Assets/Scripts/UI/FadeManager.cs → /UOP1_Project/Assets/Scripts/UI/FadeController.cs

/UOP1_Project/Assets/Scripts/SceneManagement/LoadingScreenManager.cs.meta → /UOP1_Project/Assets/Scripts/UI/LoadingInterfaceController.cs.meta

/UOP1_Project/Assets/Scripts/SceneManagement/SpinningUI.cs.meta → /UOP1_Project/Assets/Scripts/UI/UISpinner.cs.meta

正在加载...
取消
保存