- Fixed the game enter API - Fixed ToggleTimeMode() placing the player underground by using the full switch animation - Fixed the menu enter/exit events only firing once due to the game keeping the menu loaded - Moved everything from AppEngine to GameMenuEngine for consistency - Reimplemented the Block.Static property, it should actually work again too - Made the block property test only use blocks placed during the previous test, improved error handling and temporarily disabled testing the Material and the Flipped properties as they cause the game to crash
44 lines
823 B
C#
44 lines
823 B
C#
using System;
|
|
|
|
using RobocraftX.GUI.MyGamesScreen;
|
|
using Svelto.ECS;
|
|
using TechbloxModdingAPI.Engines;
|
|
using TechbloxModdingAPI.Utility;
|
|
|
|
namespace TechbloxModdingAPI.App
|
|
{
|
|
public class AppEngine : IFactoryEngine
|
|
{
|
|
public WrappedHandler<MenuEventArgs> EnterMenu;
|
|
|
|
public WrappedHandler<MenuEventArgs> ExitMenu;
|
|
|
|
public IEntityFactory Factory { set; private get; }
|
|
|
|
public string Name => "TechbloxModdingAPIAppEngine";
|
|
|
|
public bool isRemovable => false;
|
|
|
|
public EntitiesDB entitiesDB { set; private get; }
|
|
|
|
public void Dispose()
|
|
{
|
|
IsInMenu = false;
|
|
ExitMenu.Invoke(this, new MenuEventArgs { });
|
|
}
|
|
|
|
public void Ready()
|
|
{
|
|
IsInMenu = true;
|
|
EnterMenu.Invoke(this, new MenuEventArgs { });
|
|
}
|
|
|
|
// app functionality
|
|
|
|
public bool IsInMenu
|
|
{
|
|
get;
|
|
private set;
|
|
} = false;
|
|
}
|
|
}
|