fix portal placement
This commit is contained in:
14
Assets/Engine/Assets/Requirements/Place On Bottom Row.asset
Normal file
14
Assets/Engine/Assets/Requirements/Place On Bottom Row.asset
Normal file
@@ -0,0 +1,14 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5aece1c1f67b46afaf249c4520a0478f, type: 3}
|
||||
m_Name: Place On Bottom Row
|
||||
m_EditorClassIdentifier:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 49248c593c97bff4f8889e5c4da6c1bb
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
using EscapeRoomEngine.Engine.Runtime.Modules;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EscapeRoomEngine.Engine.Runtime.Requirements.Placement
|
||||
{
|
||||
/// <summary>
|
||||
/// This requirement guarantees that the back side of the module is placed on the bottom row of the space.
|
||||
/// </summary>
|
||||
[CreateAssetMenu(menuName = "Requirements/Place On Bottom Row")]
|
||||
public class PlaceOnBottomRow : PlacementRequirement
|
||||
{
|
||||
protected override List<Utilities.Placement> FilterCandidates(List<Utilities.Placement> candidates, Module module, Space space)
|
||||
{
|
||||
candidates.RemoveAll(candidate =>
|
||||
{
|
||||
var (left, right) = candidate.BackCorners;
|
||||
return !(left.z == 0 && right.z == 0);
|
||||
});
|
||||
|
||||
return candidates;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5aece1c1f67b46afaf249c4520a0478f
|
||||
timeCreated: 1683644196
|
||||
@@ -18,7 +18,7 @@ MonoBehaviour:
|
||||
preconditionRequirements: []
|
||||
placementRequirements:
|
||||
- {fileID: 11400000, guid: 43eb2a566a244964aa3a3319eaafe1a8, type: 2}
|
||||
- {fileID: 11400000, guid: ed4830127e9381245a6af07e42c52422, type: 2}
|
||||
- {fileID: 11400000, guid: 49248c593c97bff4f8889e5c4da6c1bb, type: 2}
|
||||
- {fileID: 11400000, guid: 1f1825b71bae09c438a1cb52603347d6, type: 2}
|
||||
connectedDoorDescription: {fileID: 11400000, guid: 58d2a66244450b94d8a266569cb8d2fa,
|
||||
type: 2}
|
||||
|
||||
@@ -182,6 +182,38 @@ MeshRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!1 &3937028285041533707
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3598993336778173019}
|
||||
m_Layer: 7
|
||||
m_Name: Rotation
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3598993336778173019
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3937028285041533707}
|
||||
m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6713443008366400661}
|
||||
m_Father: {fileID: 2246995198243242195}
|
||||
m_RootOrder: -1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
|
||||
--- !u!1 &5635962022185625128
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -212,7 +244,7 @@ Transform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6713443008366400661}
|
||||
- {fileID: 3598993336778173019}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -242,7 +274,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 20837d5efd544d3eb07657f581cb76d2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
size: {x: 2, y: 1}
|
||||
size: {x: 1, y: 1}
|
||||
linkedPortal: {fileID: 0}
|
||||
minNearClipPlane: 0.0001
|
||||
screen: {fileID: 6419237152131296747}
|
||||
@@ -389,15 +421,15 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8849014083961458004}
|
||||
m_LocalRotation: {x: -0, y: 1, z: -0, w: 0.00000043213367}
|
||||
m_LocalPosition: {x: -0.5, y: 0, z: 0}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0.5, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 8069972016317824103}
|
||||
m_Father: {fileID: 2246995198243242195}
|
||||
m_Father: {fileID: 3598993336778173019}
|
||||
m_RootOrder: -1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &9139844951969793274
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -66,7 +66,7 @@ Transform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 5709573715699328820}
|
||||
- {fileID: 2142869703928894347}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -96,11 +96,43 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 20837d5efd544d3eb07657f581cb76d2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
size: {x: 2, y: 1}
|
||||
size: {x: 1, y: 1}
|
||||
linkedPortal: {fileID: 0}
|
||||
minNearClipPlane: 0.0001
|
||||
screen: {fileID: 844969720899552114}
|
||||
portalTransform: {fileID: 8080754438967713432}
|
||||
--- !u!1 &3231959822301966204
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2142869703928894347}
|
||||
m_Layer: 7
|
||||
m_Name: Rotation
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2142869703928894347
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3231959822301966204}
|
||||
m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 5709573715699328820}
|
||||
m_Father: {fileID: 9212560043793041154}
|
||||
m_RootOrder: -1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
|
||||
--- !u!1 &3701970131638747585
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -464,15 +496,15 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8458413232787400471}
|
||||
m_LocalRotation: {x: -0, y: 1, z: -0, w: 0.000000059604638}
|
||||
m_LocalPosition: {x: -0.5, y: 0, z: -0.1}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0.5, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 7147726913666778841}
|
||||
m_Father: {fileID: 9212560043793041154}
|
||||
m_Father: {fileID: 2142869703928894347}
|
||||
m_RootOrder: -1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &9093302644436404973
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -12,8 +12,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 28d04249c1c4438da94b524e7d4afff2, type: 3}
|
||||
m_Name: Station 46
|
||||
m_EditorClassIdentifier:
|
||||
minRoomSize: {x: 4, y: 2}
|
||||
playSpace: {x: 4, y: 2}
|
||||
minRoomSize: {x: 2, y: 4}
|
||||
playSpace: {x: 2, y: 4}
|
||||
spaceTile: {fileID: 3229991053255736984, guid: b8f192f7cebe686468af6b1a71c4605b,
|
||||
type: 3}
|
||||
environment: {fileID: 5743657079028767629, guid: 17ecdbaca50efaa4ab503614dfec54a8,
|
||||
|
||||
Reference in New Issue
Block a user