BallanceStalker/scripts/stalker_core/StalkerManager.cs

56 lines
1.5 KiB
C#
Raw Normal View History

2022-07-02 21:23:45 +08:00
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BallanceStalkerCore {
public enum EventControllerSource {
/// <summary>
/// Default statue. It mean that we are now in camera mode.
/// </summary>
None,
/// <summary>
/// Menu take control of event input
/// </summary>
Menu,
/// <summary>
/// Console panel now take control of event input.
/// </summary>
Console,
/// <summary>
/// it is same as console, the only different is preset character
/// </summary>
Chat
}
2022-07-02 21:23:45 +08:00
public class StalkerManager {
public static StalkerManager Singleton = new StalkerManager();
private StalkerManager() {
mEventController = EventControllerSource.None;
2022-07-02 21:23:45 +08:00
mLogger = new LogManager();
mBmmoClient = new BmmoClient(mLogger);
2022-07-02 21:23:45 +08:00
}
public event Action<EventControllerSource> EventControllerChanged;
private EventControllerSource mEventController;
2022-07-02 21:23:45 +08:00
public BmmoClient mBmmoClient;
public LogManager mLogger;
public void SetEventController(EventControllerSource src) {
if (mEventController != src) {
mEventController = src;
}
EventControllerChanged?.Invoke(src);
}
public EventControllerSource GetEventController() {
return mEventController;
}
2022-07-02 21:23:45 +08:00
}
}