- Checking the material property again, it seems to work now - Fixed the Seat events not triggering during tests (the player in build and in sim is different) - Fixed Game.GetAllBlocksInGame() returning environment blocks (since a Game refers to a machine save) - Fixed the Block.Label property - Fixed the block visuals not being updated after applying changes
47 lines
1.1 KiB
C#
47 lines
1.1 KiB
C#
using System;
|
|
|
|
using RobocraftX.Common;
|
|
using RobocraftX.StateSync;
|
|
using Svelto.ECS;
|
|
using Unity.Jobs;
|
|
using TechbloxModdingAPI.Engines;
|
|
using TechbloxModdingAPI.Utility;
|
|
|
|
namespace TechbloxModdingAPI.App
|
|
{
|
|
public class GameBuildSimEventEngine : IApiEngine, IUnorderedInitializeOnTimeRunningModeEntered, IUnorderedInitializeOnTimeStoppedModeEntered
|
|
{
|
|
public WrappedHandler<GameEventArgs> SimulationMode;
|
|
|
|
public WrappedHandler<GameEventArgs> BuildMode;
|
|
|
|
public string Name => "TechbloxModdingAPIBuildSimEventGameEngine";
|
|
|
|
public bool isRemovable => false;
|
|
|
|
public EntitiesDB entitiesDB { set; private get; }
|
|
|
|
public void Dispose() { }
|
|
|
|
public void Ready() { }
|
|
|
|
public JobHandle OnInitializeTimeRunningMode(JobHandle inputDeps)
|
|
{
|
|
SimulationMode.Invoke(this, new GameEventArgs { GameName = "", GamePath = "" }); // TODO
|
|
return inputDeps;
|
|
}
|
|
|
|
public JobHandle OnInitializeTimeStoppedMode(JobHandle inputDeps)
|
|
{
|
|
BuildMode.Invoke(this, new GameEventArgs { GameName = "", GamePath = "" });
|
|
return inputDeps;
|
|
}
|
|
}
|
|
|
|
public struct GameEventArgs
|
|
{
|
|
public string GameName;
|
|
|
|
public string GamePath;
|
|
}
|
|
}
|