Amel Negra
3 年前
当前提交
42ba5e06
共有 18 个文件被更改,包括 124 次插入 和 158 次删除
-
2UOP1_Project/Assets/Prefabs/Gameplay/MusicPlayer.prefab
-
15UOP1_Project/Assets/Prefabs/UI/GameplayScene/Pause_Screen.prefab
-
115UOP1_Project/Assets/Scenes/Managers/PersistentManagers.unity
-
17UOP1_Project/Assets/Scripts/Audio/MusicPlayer.cs
-
4UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/PlayLandParticlesActionSO.cs
-
2UOP1_Project/Assets/Scripts/Events/ScriptableObjects/UI/FadeChannelSO.cs
-
3UOP1_Project/Assets/Scripts/UI/UIPause.cs
-
6UOP1_Project/Assets/Scripts/UI/FadeController.cs
-
14UOP1_Project/Assets/ScriptableObjects/UI/OnPauseOpened.asset
-
8UOP1_Project/Assets/ScriptableObjects/UI/OnPauseOpened.asset.meta
-
27UOP1_Project/Assets/Scripts/UI/LoadingInterfaceController.cs
-
17UOP1_Project/Assets/Scripts/UI/UISpinner.cs
-
33UOP1_Project/Assets/Scripts/SceneManagement/LoadingScreenManager.cs
-
19UOP1_Project/Assets/Scripts/SceneManagement/SpinningUI.cs
-
0/UOP1_Project/Assets/Scripts/UI/FadeController.cs.meta
-
0/UOP1_Project/Assets/Scripts/UI/FadeController.cs
-
0/UOP1_Project/Assets/Scripts/UI/LoadingInterfaceController.cs.meta
-
0/UOP1_Project/Assets/Scripts/UI/UISpinner.cs.meta
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!114 &11400000 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 0} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 3177d113f09ae42448cde1e1a5067d4f, type: 3} |
|||
m_Name: OnPauseOpened |
|||
m_EditorClassIdentifier: |
|
|||
fileFormatVersion: 2 |
|||
guid: 995da9391d4589044a8819eeb09bab8f |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 11400000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
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); |
|||
} |
|||
|
|||
} |
|
|||
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); |
|||
} |
|||
} |
|
|||
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); |
|||
} |
|||
|
|||
} |
|
|||
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); |
|||
} |
|||
} |
撰写
预览
正在加载...
取消
保存
Reference in new issue