40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using System;
|
|
using Preparation.Utility.Logging;
|
|
|
|
namespace GameClass.GameObj
|
|
{
|
|
public static class GameObjLogger
|
|
{
|
|
public static readonly Logger logger = new("GameObj");
|
|
}
|
|
|
|
public static class LoggingFunctional
|
|
{
|
|
public static string CharacterLogInfo(Character character)
|
|
=> Logger.ObjInfo(typeof(Character), $"{character.TeamID} {character.PlayerID}");
|
|
public static string CharacterLogInfo(long teamId, long characterId)
|
|
=> Logger.ObjInfo(typeof(Character), $"{teamId} {characterId}");
|
|
public static string AutoLogInfo(object obj)
|
|
{
|
|
Type tp = obj.GetType();
|
|
if (tp == typeof(Character))
|
|
return CharacterLogInfo((Character)obj);
|
|
else
|
|
return Logger.ObjInfo(obj);
|
|
}
|
|
}
|
|
|
|
public static class CharacterLogging
|
|
{
|
|
public static readonly Logger logger = new("Ship");
|
|
}
|
|
}
|
|
|
|
namespace GameClass.GameObj.Map
|
|
{
|
|
public static class MapLogging
|
|
{
|
|
public static readonly Logger logger = new("Map");
|
|
}
|
|
}
|