Bring in AAC!
project ive been working on for a while, just felt confident enough to move it here
This commit is contained in:
parent
e608e2a56b
commit
1d7052a258
209 changed files with 1561 additions and 74738 deletions
68
AAC/AACCore/Editor/Logger.cs
Normal file
68
AAC/AACCore/Editor/Logger.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
using System.Collections.Generic;
|
||||
using gay.lilyy.logger;
|
||||
using UnityEngine;
|
||||
|
||||
namespace gay.lilyy.aaccore {
|
||||
public class V5AACLogger : BaseLogger
|
||||
{
|
||||
private static V5AACLogger _instance;
|
||||
public static V5AACLogger Instance => _instance ??= new V5AACLogger();
|
||||
|
||||
protected override string SystemName => "AACCore";
|
||||
|
||||
protected override Dictionary<LogLevel, string> LogColors => new()
|
||||
{
|
||||
{ LogLevel.Info, "#87CEEB" }, // Sky Blue
|
||||
{ LogLevel.Warning, "#FFA500" }, // Orange
|
||||
{ LogLevel.Error, "#FF6B6B" }, // Red
|
||||
{ LogLevel.Success, "#90EE90" }, // Light Green
|
||||
{ LogLevel.Debug, "#DDA0DD" } // Plum
|
||||
};
|
||||
|
||||
protected override Dictionary<LogLevel, string> LogPrefixes => new()
|
||||
{
|
||||
{ LogLevel.Info, "ℹ️" },
|
||||
{ LogLevel.Warning, "⚠️" },
|
||||
{ LogLevel.Error, "❌" },
|
||||
{ LogLevel.Success, "✅" },
|
||||
{ LogLevel.Debug, "🐛" }
|
||||
};
|
||||
|
||||
// Static convenience methods for easy access
|
||||
public static void LogInfo(string message, Object context = null) => Instance.Info(message, context);
|
||||
public static void LogWarning(string message, Object context = null) => Instance.Warning(message, context);
|
||||
public static void LogError(string message, Object context = null) => Instance.Error(message, context);
|
||||
public static void LogSuccess(string message, Object context = null) => Instance.Success(message, context);
|
||||
public static void LogDebug(string message, Object context = null) => Instance.Debug(message, context);
|
||||
}
|
||||
|
||||
public class V5AACLayerGroupLogger : BaseLogger
|
||||
{
|
||||
private readonly string _layerName;
|
||||
|
||||
public V5AACLayerGroupLogger(string layerName)
|
||||
{
|
||||
_layerName = layerName;
|
||||
}
|
||||
|
||||
protected override string SystemName => $"AACCore [{_layerName}] ";
|
||||
|
||||
protected override Dictionary<LogLevel, string> LogColors => new()
|
||||
{
|
||||
{ LogLevel.Info, "#87CEEB" },
|
||||
{ LogLevel.Warning, "#FFA500" },
|
||||
{ LogLevel.Error, "#FF6B6B" },
|
||||
{ LogLevel.Success, "#90EE90" },
|
||||
{ LogLevel.Debug, "#DDA0DD" }
|
||||
};
|
||||
|
||||
protected override Dictionary<LogLevel, string> LogPrefixes => new();
|
||||
|
||||
// Convenience methods for easy access
|
||||
public void LogInfo(string message, Object context = null) => Info(message, context);
|
||||
public void LogWarning(string message, Object context = null) => Warning(message, context);
|
||||
public void LogError(string message, Object context = null) => Error(message, context);
|
||||
public void LogSuccess(string message, Object context = null) => Success(message, context);
|
||||
public void LogDebug(string message, Object context = null) => Debug(message, context);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue