Skip to content

Commit

Permalink
Merge pull request #1 from Doprez/minor-revision
Browse files Browse the repository at this point in the history
changed to EntityComponent instead of StartupScript
  • Loading branch information
Nicogo1705 authored Sep 26, 2023
2 parents 8706609 + 21b4022 commit 4708c7b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,10 @@ namespace BepuPhysicIntegrationTest.Integration.Components.Colliders
[DataContract]
[DefaultEntityComponentProcessor(typeof(ColliderProcessor), ExecutionMode = ExecutionMode.Runtime)]
[ComponentCategory("Bepu - Colliders")]
public abstract class ColliderComponent : StartupScript
public abstract class ColliderComponent : EntityComponent
{
public float Mass { get; set; } = 1f;

internal ContainerComponent Container => Entity.GetInMeOrParents<ContainerComponent>();

public override void Start()
{
base.Start();
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@ namespace BepuPhysicIntegrationTest.Integration.Components.Containers
[DefaultEntityComponentProcessor(typeof(ContainerProcessor), ExecutionMode = ExecutionMode.Runtime)]
[ComponentCategory("Bepu - Containers")]

public abstract class ContainerComponent : StartupScript
public abstract class ContainerComponent : EntityComponent
{
public SimulationComponent BepuSimulation => Entity.GetInMeOrParents<SimulationComponent>();
internal ContainerData ContainerData { get; set; }

public override void Start()
{
base.Start();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@

namespace BepuPhysicIntegrationTest.Integration.Components.Simulations
{
[DataContract]
[DefaultEntityComponentProcessor(typeof(SimulationProcessor), ExecutionMode = ExecutionMode.Runtime)]
[ComponentCategory("Bepu - Simulations")]
public class SimulationComponent : StartupScript
public class SimulationComponent : EntityComponent
{
internal ThreadDispatcher ThreadDispatcher { get; }
internal BufferPool BufferPool { get; }
Expand All @@ -41,13 +42,6 @@ public class SimulationComponent : StartupScript
[Display(6, "SolveSubStep")]
public int SolveSubStep = 4; //8


public override void Start()
{

base.Start();
}

public SimulationComponent()
{
var targetThreadCount = Math.Max(1, Environment.ProcessorCount > 4 ? Environment.ProcessorCount - 2 : Environment.ProcessorCount - 1);
Expand Down

0 comments on commit 4708c7b

Please sign in to comment.