Merge branch 'Dev' into Levels2
This commit is contained in:
commit
019e3a053e
68 files changed
+2185
-135
No files matched your search
@@ -0,0 +1,42 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.App.Debug
|
||||
{
|
||||
public class Logger : MonoBehaviour
|
||||
{
|
||||
//#if !UNITY_EDITOR
|
||||
static string myLog = "";
|
||||
private string output;
|
||||
private string stack;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
Application.logMessageReceived += Log;
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
Application.logMessageReceived -= Log;
|
||||
}
|
||||
|
||||
public void Log(string logString, string stackTrace, LogType type)
|
||||
{
|
||||
output = logString;
|
||||
stack = stackTrace;
|
||||
myLog = output + " " + myLog;
|
||||
if (myLog.Length > 5000)
|
||||
{
|
||||
myLog = myLog.Substring(0, 4000);
|
||||
}
|
||||
}
|
||||
|
||||
void OnGUI()
|
||||
{
|
||||
//if (!Application.isEditor) //Do not display in editor ( or you can use the UNITY_EDITOR macro to also disable the rest)
|
||||
{
|
||||
myLog = GUI.TextArea(new Rect(10, 10, Screen.width - 10, Screen.height - 10), myLog);
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc474668ede54a9aa1e0f29c59f067f5
|
||||
timeCreated: 1764915992
|
||||
@@ -9,9 +9,9 @@ namespace Code.Audio
|
||||
public enum EnemiesSounds
|
||||
{
|
||||
GrandpaAttack,
|
||||
GrandpaStep,
|
||||
RoachAttack,
|
||||
RoachStep,
|
||||
GrandpaStep
|
||||
RoachStep
|
||||
}
|
||||
public enum DispatcherSounds
|
||||
{
|
||||
|
||||
@@ -120,6 +120,19 @@ namespace Code.Audio
|
||||
// foreach (var assetReference in _menuSoundtrack) assetReference.ReleaseAsset();
|
||||
_menuMusicHandle.Release();
|
||||
}
|
||||
public async UniTask WarmCourier()
|
||||
{
|
||||
// _courierHandle = Addressables.LoadAssetsAsync<AudioClip>(_courier, OnCourierLoaded, Addressables.MergeMode.Union);
|
||||
foreach (var assetReference in _courier) CourierAudios.Add(await Addressables.LoadAssetAsync<AudioClip>(assetReference));
|
||||
// await _courierHandle.ToUniTask();
|
||||
}
|
||||
|
||||
public void ReleaseCourier()
|
||||
{
|
||||
foreach (var assetReference in CourierAudios) Addressables.Release(assetReference);
|
||||
CourierAudios.Clear();
|
||||
// _courierHandle.Release();
|
||||
}
|
||||
public async UniTask WarmDeathMusic()
|
||||
{
|
||||
_deathMusicHandle = Addressables.LoadAssetsAsync<AudioClip>(_deathSoundtrack, OnDeathTrackLoaded, Addressables.MergeMode.Union);
|
||||
@@ -155,18 +168,6 @@ namespace Code.Audio
|
||||
EnemiesAudios.Clear();
|
||||
_enemiesHandle.Release();
|
||||
}
|
||||
public async UniTask WarmCourier()
|
||||
{
|
||||
_courierHandle = Addressables.LoadAssetsAsync<AudioClip>(_courier, OnCourierLoaded, Addressables.MergeMode.Union);
|
||||
|
||||
await _courierHandle.ToUniTask();
|
||||
}
|
||||
|
||||
public void ReleaseCourier()
|
||||
{
|
||||
CourierAudios.Clear();
|
||||
_courierHandle.Release();
|
||||
}
|
||||
|
||||
public async UniTask WarmDispatcher( )
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace Code.UI.Panels
|
||||
{
|
||||
[SerializeField] private Image background;
|
||||
[SerializeField] private Image loadingImage;
|
||||
[SerializeField] private Image courierAnim;
|
||||
// [SerializeField] private TMP_Text loadingTitle;
|
||||
// [SerializeField] private TMP_Text vyapWatermark;
|
||||
public override void Hide()
|
||||
@@ -15,6 +16,7 @@ namespace Code.UI.Panels
|
||||
Shown = false;
|
||||
background.enabled = false;
|
||||
loadingImage.enabled = false;
|
||||
courierAnim.enabled = false;
|
||||
// loadingTitle.enabled = false;
|
||||
// vyapWatermark.enabled = false;
|
||||
}
|
||||
@@ -23,6 +25,7 @@ namespace Code.UI.Panels
|
||||
Shown = true;
|
||||
background.enabled = true;
|
||||
loadingImage.enabled = true;
|
||||
courierAnim.enabled = true;
|
||||
// loadingTitle.enabled = true;
|
||||
// vyapWatermark.enabled = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user