Skip to content

Commit

Permalink
ContactBase is an EntrypointComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
ReinaS-64892 committed Sep 7, 2023
1 parent a79e863 commit fb35489
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public class ComponentDependencies
[NotNull]
public IReadOnlyDictionary<Component, (DependencyFlags flags, DependencyType type)> Dependencies => _dependencies;

[NotNull] private readonly Dictionary<Component, (DependencyFlags, DependencyType)> _dependencies =
[NotNull]
private readonly Dictionary<Component, (DependencyFlags, DependencyType)> _dependencies =
new Dictionary<Component, (DependencyFlags, DependencyType)>();

public void AddActiveDependency(Component component, bool onlyIfTargetCanBeEnabled = false,
Expand Down Expand Up @@ -198,7 +199,7 @@ private static void AddParser<T>(ComponentParser<T> parser) where T : Component
_byTypeParser.Add(typeof(T), (collector, deps, component) => parser(collector, deps, (T)component));
}

private static void AddParserWithExtends<TParent, TChild>(ComponentParser<TChild> parser)
private static void AddParserWithExtends<TParent, TChild>(ComponentParser<TChild> parser)
where TParent : Component
where TChild : TParent
{
Expand Down Expand Up @@ -506,6 +507,7 @@ void CollectTransforms(Transform bone)

AddParser<ContactBase>((collector, deps, component) =>
{
deps.EntrypointComponent = true;
deps.AddActiveDependency(component.rootTransform);
});
AddParserWithExtends<ContactBase, ContactReceiver>();
Expand Down Expand Up @@ -537,10 +539,10 @@ void CollectTransforms(Transform bone)
deps.AddActiveDependency(collider, false);
}
});

// ReSharper disable once PossibleNullReferenceException
_byTypeParser.Add(ExternalLibraryAccessor.DynamicBone.ColliderType,
(collector, deps, component) => {});
(collector, deps, component) => { });
}

// TODOL External Library: FinalIK
Expand Down

0 comments on commit fb35489

Please sign in to comment.