Integrate Nakama managers and enhance powerup system
Added Nakama and related manager scripts to autoload in project.godot and updated input mappings. Improved powerup_manager.gd with new methods and aliases for compatibility and gameplay rewards. Refactored ui_manager.gd to better initialize UI elements and removed unused code. Added playerboard_is_empty to player.gd for board state checks. Minor formatting changes in Nakama C# utility files for consistency.
This commit is contained in:
@@ -17,63 +17,63 @@ using Godot;
|
||||
|
||||
namespace Nakama {
|
||||
|
||||
/// <summary>
|
||||
/// A logger which prints to the Godot console.
|
||||
/// </summary>
|
||||
public class GodotLogger : ILogger {
|
||||
/// <summary>
|
||||
/// A logger which prints to the Godot console.
|
||||
/// </summary>
|
||||
public class GodotLogger : ILogger {
|
||||
|
||||
/// <summary>
|
||||
/// The log level.
|
||||
/// </summary>
|
||||
public enum LogLevel {
|
||||
NONE,
|
||||
ERROR,
|
||||
WARNING,
|
||||
INFO,
|
||||
DEBUG,
|
||||
}
|
||||
/// <summary>
|
||||
/// The log level.
|
||||
/// </summary>
|
||||
public enum LogLevel {
|
||||
NONE,
|
||||
ERROR,
|
||||
WARNING,
|
||||
INFO,
|
||||
DEBUG,
|
||||
}
|
||||
|
||||
private string module;
|
||||
private LogLevel level;
|
||||
private string module;
|
||||
private LogLevel level;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a GodotLogger.
|
||||
/// </summary>
|
||||
/// <param name="p_module">The label to use for log entries.</param>
|
||||
/// <param name="p_level">The log level (or lower) to print to the console.</param>
|
||||
public GodotLogger(string p_module = "Nakama", LogLevel p_level = LogLevel.ERROR) {
|
||||
module = p_module;
|
||||
level = p_level;
|
||||
}
|
||||
/// <summary>
|
||||
/// Constructs a GodotLogger.
|
||||
/// </summary>
|
||||
/// <param name="p_module">The label to use for log entries.</param>
|
||||
/// <param name="p_level">The log level (or lower) to print to the console.</param>
|
||||
public GodotLogger(string p_module = "Nakama", LogLevel p_level = LogLevel.ERROR) {
|
||||
module = p_module;
|
||||
level = p_level;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ILogger"/>
|
||||
public void ErrorFormat(string format, params object[] args) {
|
||||
if (level >= LogLevel.ERROR) {
|
||||
GD.PrintErr("=== " + module + " : ERROR === " + String.Format(format, args));
|
||||
}
|
||||
}
|
||||
/// <inheritdoc cref="ILogger"/>
|
||||
public void ErrorFormat(string format, params object[] args) {
|
||||
if (level >= LogLevel.ERROR) {
|
||||
GD.PrintErr("=== " + module + " : ERROR === " + String.Format(format, args));
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ILogger"/>
|
||||
public void WarnFormat(string format, params object[] args) {
|
||||
if (level >= LogLevel.WARNING) {
|
||||
GD.Print("=== " + module + " : WARN === " + String.Format(format, args));
|
||||
}
|
||||
}
|
||||
/// <inheritdoc cref="ILogger"/>
|
||||
public void WarnFormat(string format, params object[] args) {
|
||||
if (level >= LogLevel.WARNING) {
|
||||
GD.Print("=== " + module + " : WARN === " + String.Format(format, args));
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ILogger"/>
|
||||
public void InfoFormat(string format, params object[] args) {
|
||||
if (level >= LogLevel.INFO) {
|
||||
GD.Print("=== " + module + " : INFO === " + String.Format(format, args));
|
||||
}
|
||||
}
|
||||
/// <inheritdoc cref="ILogger"/>
|
||||
public void InfoFormat(string format, params object[] args) {
|
||||
if (level >= LogLevel.INFO) {
|
||||
GD.Print("=== " + module + " : INFO === " + String.Format(format, args));
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ILogger"/>
|
||||
public void DebugFormat(string format, params object[] args) {
|
||||
if (level >= LogLevel.DEBUG) {
|
||||
GD.Print("=== " + module + " : DEBUG === " + String.Format(format, args));
|
||||
}
|
||||
}
|
||||
/// <inheritdoc cref="ILogger"/>
|
||||
public void DebugFormat(string format, params object[] args) {
|
||||
if (level >= LogLevel.DEBUG) {
|
||||
GD.Print("=== " + module + " : DEBUG === " + String.Format(format, args));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user