Rename Unity entity blueprint materializer
This commit is contained in:
parent
d25b9c959c
commit
7259bca77b
5 changed files with 45 additions and 45 deletions
|
|
@ -24,7 +24,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
private AetheriaUnityPilotOperationAdapter _pilotOperationAdapter;
|
||||
private AetheriaUnityObservedTargetQuery _observedTargetQuery;
|
||||
private AetheriaUnityObservedFrameApplier _observedFrameApplier;
|
||||
private AetheriaUnityEntityConstructionBlueprintProjector _entityConstructionBlueprintProjector;
|
||||
private AetheriaUnityEntityBlueprintMaterializer _entityBlueprintMaterializer;
|
||||
private AetheriaUnityActionBarBindingAdapter _actionBarBindingAdapter;
|
||||
private AetheriaUnityMenuShell _menuShell;
|
||||
private AetheriaUnityGameplayInputShell _gameplayInputShell;
|
||||
|
|
@ -42,7 +42,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
_observedEntityRestorer ??= new AetheriaUnityObservedEntityRestorer(
|
||||
_observedEntityIndex,
|
||||
ItemManager,
|
||||
EntityConstructionBlueprintProjector.ProjectObservedEntity,
|
||||
EntityBlueprintMaterializer.MaterializeObservedEntity,
|
||||
_loadoutItemFactory.CreateLoadoutItem,
|
||||
Debug.LogWarning);
|
||||
private AetheriaUnityObservedZoneContextFactory ObservedZoneContextFactory =>
|
||||
|
|
@ -106,8 +106,8 @@ public class ActionGameManager : MonoBehaviour
|
|||
() => CurrentEntity,
|
||||
entity => CurrentEntityBinder.RestoreBinding(entity),
|
||||
Debug.LogWarning);
|
||||
private AetheriaUnityEntityConstructionBlueprintProjector EntityConstructionBlueprintProjector =>
|
||||
_entityConstructionBlueprintProjector ??= new AetheriaUnityEntityConstructionBlueprintProjector(_loadoutItemFactory);
|
||||
private AetheriaUnityEntityBlueprintMaterializer EntityBlueprintMaterializer =>
|
||||
_entityBlueprintMaterializer ??= new AetheriaUnityEntityBlueprintMaterializer(_loadoutItemFactory);
|
||||
private AetheriaUnityActionBarBindingAdapter ActionBarBindings =>
|
||||
_actionBarBindingAdapter ??= new AetheriaUnityActionBarBindingAdapter(_actionBarPresentation);
|
||||
private AetheriaUnityMenuShell MenuShell =>
|
||||
|
|
|
|||
|
|
@ -8,28 +8,28 @@ using System.Linq;
|
|||
using GameCult.Aetheria.State.Verse;
|
||||
using Unity.Mathematics;
|
||||
|
||||
public sealed class AetheriaUnityEntityConstructionBlueprintProjector
|
||||
public sealed class AetheriaUnityEntityBlueprintMaterializer
|
||||
{
|
||||
private readonly AetheriaUnityLoadoutItemFactory _loadoutItemFactory;
|
||||
|
||||
public AetheriaUnityEntityConstructionBlueprintProjector(
|
||||
public AetheriaUnityEntityBlueprintMaterializer(
|
||||
AetheriaUnityLoadoutItemFactory loadoutItemFactory)
|
||||
{
|
||||
_loadoutItemFactory = loadoutItemFactory ?? throw new ArgumentNullException(nameof(loadoutItemFactory));
|
||||
}
|
||||
|
||||
public EntityConstructionBlueprint ProjectTemplate(AetheriaRuntimeLoadoutTemplateSnapshot template)
|
||||
public EntityConstructionBlueprint MaterializeTemplate(AetheriaRuntimeLoadoutTemplateSnapshot template)
|
||||
{
|
||||
if (template == null)
|
||||
return null;
|
||||
|
||||
var blueprint = ProjectLoadoutEntity(template.RootEntity);
|
||||
var blueprint = MaterializeLoadoutEntity(template.RootEntity);
|
||||
if (blueprint != null && string.IsNullOrWhiteSpace(blueprint.Name))
|
||||
blueprint.Name = template.Name;
|
||||
return blueprint;
|
||||
}
|
||||
|
||||
public EntityConstructionBlueprint ProjectLoadoutEntity(AetheriaRuntimeEntityLoadoutSnapshot entity)
|
||||
public EntityConstructionBlueprint MaterializeLoadoutEntity(AetheriaRuntimeEntityLoadoutSnapshot entity)
|
||||
{
|
||||
if (entity == null)
|
||||
return null;
|
||||
|
|
@ -55,13 +55,13 @@ public sealed class AetheriaUnityEntityConstructionBlueprintProjector
|
|||
blueprint.DockingBayAssignments = entity.DockingBayAssignments.ToArray();
|
||||
blueprint.WeaponGroups = entity.WeaponGroups.Select(group => group.ToArray()).ToArray();
|
||||
blueprint.Children = entity.Children
|
||||
.Select(ProjectLoadoutEntity)
|
||||
.Select(MaterializeLoadoutEntity)
|
||||
.Where(child => child != null)
|
||||
.ToArray();
|
||||
return blueprint;
|
||||
}
|
||||
|
||||
public EntityConstructionBlueprint ProjectObservedEntity(
|
||||
public EntityConstructionBlueprint MaterializeObservedEntity(
|
||||
AetheriaRuntimeEntitySnapshot entity,
|
||||
bool isCurrentEntity)
|
||||
{
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 88f0588c14c7a1d4c87095a96585c957
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 88f0588c14c7a1d4c87095a96585c957
|
||||
Loading…
Reference in a new issue