Skip to content

Commit

Permalink
Moved Validation methods into Component and Removed "Samples"
Browse files Browse the repository at this point in the history
  • Loading branch information
knowlife4 committed Mar 10, 2023
1 parent a648912 commit fbd61bc
Show file tree
Hide file tree
Showing 29 changed files with 7 additions and 1,062 deletions.
1 change: 1 addition & 0 deletions Runtime/ECTComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public virtual IEnumerable<IComponent> GetComponentsRecursively()
}

protected static IValidation ValidateReferences(params UnityEngine.Object[] references) => ECTValidation.ValidateReferences(references);
protected static IValidation ValidateReference<T>(T input, out T output) where T : UnityEngine.Object => ECTValidation.ValidateReference(input, out output);

public abstract class System<TComponent> : ECTSystem<TRoot, TParent, TComponent, ECTSystemData> where TComponent : class, IComponent { }

Expand Down
6 changes: 2 additions & 4 deletions Runtime/ECTComponentParent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ public override TSystem GetSystem<TSystem>()

public new abstract class System<TComponent> : ECTSystem<TRoot, TParent, TComponent, ComponentParentSystemData> where TComponent : class, IComponent, IParent
{
protected override void OnUpdate()
{
Data.DataGroup.Update(Root, Component);
}
public void UpdateSystems() => Data.DataGroup.Update(Root, Component);
protected override void OnUpdate() => UpdateSystems();
}

public abstract class Component : ECTComponent<TRoot, TComponentParent> { }
Expand Down
1 change: 0 additions & 1 deletion Runtime/ECTSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ protected virtual void OnInitialize() { }

public IValidation QuerySystem<TSystem>(out TSystem found) where TSystem : class, ISystem => Root.QuerySystem(out found);
public IValidation QueryReference<TReference>(out TReference found) where TReference : struct, ISceneReference => Root.QueryReference(out found);
public IValidation ValidateReference<T>(T input, out T output) where T : UnityEngine.Object => ECTValidation.ValidateReference(input, out output);
public ECTBoolValidation Subscribe(ECTAction ectAction, Action action)
{
ectAction.Subscribe(action);
Expand Down
78 changes: 0 additions & 78 deletions Samples/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions Samples/Platformer.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Samples/Platformer/Components.meta

This file was deleted.

8 changes: 0 additions & 8 deletions Samples/Platformer/Components/Player.meta

This file was deleted.

17 changes: 0 additions & 17 deletions Samples/Platformer/Components/Player/MovementRotate.asset

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions Samples/Platformer/Components/Player/MovementWalk.asset

This file was deleted.

8 changes: 0 additions & 8 deletions Samples/Platformer/Components/Player/MovementWalk.asset.meta

This file was deleted.

17 changes: 0 additions & 17 deletions Samples/Platformer/Components/Player/PlayerMovement.asset

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions Samples/Platformer/Materials.meta

This file was deleted.

83 changes: 0 additions & 83 deletions Samples/Platformer/Materials/Test.mat

This file was deleted.

8 changes: 0 additions & 8 deletions Samples/Platformer/Materials/Test.mat.meta

This file was deleted.

Loading

0 comments on commit fbd61bc

Please sign in to comment.