private static void MonoGameOnInitialize(object sender, EventArgs eventArgs) { Resources = new ResourcesManager(); Platform.Initialize(); Logger.Log("Rise", LoggerLevel.Info, "Initializing modules..."); Controller = new Controller(); Pointing = new Pointing(); Input = new LegacyInputManager(); Sound = new SoundManager(); Graphic = new GraphicManager(MonoGame.Graphics, MonoGame.GraphicsDevice); Scene = new SceneManager(); Ui = new UiManager(); Debug = new DebugManager(); _initializeAction?.Invoke(); Scene.Initialize(); Input.Initialize(); Scene.Switch(_startScene); Config.Apply(); Graphic.AllowUserResizing(); }
protected void OnEnable() { // DontDestroyOnLoad(gameObject); if (Pointing.instance == null) { Pointing.instance = this; } }
public static void AddLog(int radius, int angle, int point, float time) { var log = new Pointing() { radius = radius, angle = angle, point = point, time = time }; pointingLogs.Add(log); Debug.Log("Added point: " + pointingLogs[pointingLogs.Count - 1].point); }
private void ConfigurePointing() { switch (Pointing) { case Direction.None: return; case Direction.Left: case Direction.Right: ElementClass = $"{ElementClass} {Pointing.GetDescription()} pointing"; break; default: ElementClass = $"{ElementClass} pointing {Pointing.GetDescription()}"; break; } }
private static void MonoGameOnInitialize(object sender, EventArgs eventArgs) { Ressource = new RessourceManager(); Platform.Initialize(); Logger.Log("Rise", LoggerLevel.Info, "Initializing modules..."); Keyboard = new KeyboardInputManager(); Controller = new Controller(); Pointing = new Pointing(); Input = new LegacyInputManager(); Graphic = new GraphicManager(MonoGame.Graphics, MonoGame.GraphicsDevice); Scene = new SceneManager(); Ui = new UiManager(); Debug = new DebugManager(); _initializeAction?.Invoke(); Graphic.ResetRenderTargets(); Scene.Initialize(); Input.Initialize(); if (Platform.GetPlatformName() != "Android") { Keyboard.Initialize(300, 5); } Scene.Switch(_startScene); if (Platform.Family == PlatformFamily.Desktop) { Graphic.SetSize(1366, 768); } }