Skip to content

Commit

Permalink
chore: reformat with clang
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelwan committed Jun 29, 2024
1 parent 1a517d0 commit 9c5b512
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
20 changes: 8 additions & 12 deletions Runtime/EcsactDefaults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,15 @@ namespace Ecsact {

static public class Defaults {
internal static EcsactRuntime? _Runtime;
public static EcsactRuntime Runtime =>
_Runtime ??
throw new Exception(
"Runtime is null, if you want to access it as early as possible " +
"use Ecsact.Defaults.WhenReady"
);
public static EcsactRuntime Runtime => _Runtime ??
throw new Exception("Runtime is null, if you want to access it as early " +
"as possible " +
"use Ecsact.Defaults.WhenReady");
internal static Ecsact.Registry? _Registry;
public static Ecsact.Registry Registry =>
_Registry ??
throw new Exception(
"Registry is null, if you want to access it as early as possible " +
"use Ecsact.Defaults.WhenReady"
);
public static Ecsact.Registry Registry => _Registry ??
throw new Exception("Registry is null, if you want to access it as early " +
"as possible " +
"use Ecsact.Defaults.WhenReady");
public static Ecsact.UnitySync.EntityGameObjectPool? Pool;
public static EcsactRunner? Runner;

Expand Down
4 changes: 2 additions & 2 deletions Runtime/EcsactExecutionOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public BuilderEntity AddComponent<C>(C component)
private List<Int32> adds_entities;
private List<EcsactRuntime.EcsactComponent> updates;
private List<Int32> updates_entities;
private List<IntPtr> updates__entities_indexes;
private List<IntPtr> updates_entities_indexes;
private List<EcsactRuntime.EcsactComponentId> removes;
private List<Int32> removes_entities;
private List<IntPtr> removes_entities_indexes;
Expand All @@ -42,7 +42,7 @@ internal ExecutionOptions() {
adds_entities = new();
updates = new();
updates_entities = new();
updates__entities_indexes = new();
updates_entities_indexes = new();
removes = new();
removes_entities = new();
removes_entities_indexes = new();
Expand Down
2 changes: 1 addition & 1 deletion Runtime/EntityGameObjectPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public GameObject? rootGameObject {

private EntityGameObjectPool() {
entityComponentIds = new List<ComponentIdsList>();
entityGameObjects = new List<GameObject?>();
entityGameObjects = new List < GameObject ? > ();
}

void OnEnable() {
Expand Down
12 changes: 8 additions & 4 deletions Runtime/Internal/EcsactRuntimeDefaults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ internal static void Setup() {
// If async no default available registry!
if(settings.runner == EcsactRuntimeSettings.RunnerType.AsyncRunner) {
cacheRegistry = new CacheRegistry(Ecsact.Defaults.Runtime, reg);
} else if(settings.runner == EcsactRuntimeSettings.RunnerType.DefaultRunner) {
} else if(settings.runner ==
EcsactRuntimeSettings.RunnerType.DefaultRunner) {
settings.defaultRegistry!.registryId = registry_id;

Ecsact.Defaults._Registry = reg;
Expand Down Expand Up @@ -104,15 +105,18 @@ private static void SetDefaultsRunner(EcsactRuntimeSettings settings) {
var defReg = settings.defaultRegistry;

if(settings.runner == EcsactRuntimeSettings.RunnerType.DefaultRunner) {
if(defReg.updateMethod == EcsactRuntimeDefaultRegistry.UpdateMethod.None) {
if(defReg.updateMethod ==
EcsactRuntimeDefaultRegistry.UpdateMethod.None) {
Ecsact.Defaults.Runner = null;
} else if(defReg.updateMethod == EcsactRuntimeDefaultRegistry.UpdateMethod.FixedUpdate) {
} else if(defReg.updateMethod ==
EcsactRuntimeDefaultRegistry.UpdateMethod.FixedUpdate) {
Ecsact.Defaults.Runner =
EcsactRunner.CreateInstance<DefaultFixedRunner>(
settings,
"Default Fixed Runner"
);
} else if(defReg.updateMethod == EcsactRuntimeDefaultRegistry.UpdateMethod.Update) {
} else if(defReg.updateMethod ==
EcsactRuntimeDefaultRegistry.UpdateMethod.Update) {
Ecsact.Defaults.Runner = EcsactRunner.CreateInstance<DefaultRunner>(
settings,
"Default Runner"
Expand Down

0 comments on commit 9c5b512

Please sign in to comment.