Dodana możliwość wejścia do stolika z lewej strony + klasa przeszkody

This commit is contained in:
Jakub Łangowski 2021-04-23 16:58:03 +02:00
parent 3adcc42841
commit 5157efea48
16 changed files with 3730 additions and 1796 deletions

File diff suppressed because it is too large Load Diff

View File

@ -14,12 +14,37 @@ namespace Assets.Logic.Agent
{
public Rotation AgentRotation;
public Node AgentPosition;
public override bool Equals(object obj)
{
if (obj == null) return false;
var state = (State) obj;
if (state.AgentPosition is Table)
{
return AgentPosition == state.AgentPosition &&
(AgentRotation == GETOppositeRotation(state.AgentRotation) ||
AgentRotation == state.AgentRotation);
}
return AgentPosition == state.AgentPosition && AgentRotation == state.AgentRotation;
}
private Rotation GETOppositeRotation(Rotation rotation)
{
switch (rotation)
{
case Rotation.Bottom:
return Rotation.Top;
case Rotation.Top:
return Rotation.Bottom;
case Rotation.Left:
return Rotation.Right;
case Rotation.Right:
return Rotation.Left;
}
return Rotation.Top;
}
}
}

View File

@ -9,14 +9,22 @@ namespace Logic.Graph
{
public class Node : MonoBehaviour
{
public Material nodeMat;
public Material pathMat;
public List<Node> neighbors;
[SerializeField] private float maxRange = 0.5f;
[SerializeField] private Material nodeMat;
[SerializeField] private Material pathMat;
[SerializeField] private bool debug = false;
[SerializeField] private int movementPenalty = 0;
[SerializeField] private int hCost;
[SerializeField] private int gCost;
public int FCost => gCost + hCost;
private readonly float _maxRayRange = 0.75f;
private readonly float _maxTableRayRange = 0.5f;
private readonly float _maxSphereRange = 0.25f;
private int _nodeLayerMask;
private int _tableLayerMask;
private int _obstacleLayerMask;
private Vector3 _position;
private float _nodeRayMaxLength;
private float _tableRayMaxLength;
@ -28,20 +36,6 @@ namespace Logic.Graph
InitializeNeighbours();
}
private void Update()
{
if (debug)
{
Debug.DrawRay(_position, Vector3.right + new Vector3(maxRange, 0, 0), Color.red);
Debug.DrawRay(_position, Vector3.left + new Vector3(-maxRange, 0, 0), Color.blue);
Debug.DrawRay(_position, Vector3.forward + new Vector3(0, 0, maxRange), Color.green);
Debug.DrawRay(_position, Vector3.back + new Vector3(0, 0, -maxRange), Color.magenta);
Debug.DrawRay(_position, Vector3.right + new Vector3(_tableRayMaxLength, 0, 0), Color.cyan);
Debug.DrawRay(_position, Vector3.left + new Vector3(-_tableRayMaxLength, 0, 0), Color.yellow);
}
}
public void MarkAsPath()
{
if (!gameObject.CompareTag("Table"))
@ -57,15 +51,82 @@ namespace Logic.Graph
_renderer.material = nodeMat;
}
}
public Node FindNode(Rotation agentRotation)
{
switch (agentRotation)
{
case Rotation.Left:
return neighbors.FirstOrDefault(x =>
x.transform.position.z.IsEq(transform.position.z) &&
x.transform.position.x.IsEq(transform.position.x - 1));
case Rotation.Right:
return neighbors.FirstOrDefault(x =>
x.transform.position.z.IsEq(transform.position.z) &&
x.transform.position.x.IsEq(transform.position.x + 1));
case Rotation.Top:
return neighbors.FirstOrDefault(x =>
x.transform.position.x.IsEq(transform.position.x) &&
x.transform.position.z.IsEq(transform.position.z + 1.25f));
case Rotation.Bottom:
return neighbors.FirstOrDefault(x =>
x.transform.position.x.IsEq(transform.position.x) &&
x.transform.position.z.IsEq(transform.position.z - 1.25f));
default:
return null;
}
}
private void Update()
{
if (debug)
{
Debug.DrawRay(_position, Vector3.right + new Vector3(_maxRayRange, 0, 0), Color.red);
Debug.DrawRay(_position, Vector3.left + new Vector3(-_maxRayRange, 0, 0), Color.blue);
Debug.DrawRay(_position, Vector3.forward + new Vector3(0, 0, _maxRayRange), Color.green);
Debug.DrawRay(_position, Vector3.back + new Vector3(0, 0, -_maxRayRange), Color.magenta);
Debug.DrawRay(_position, Vector3.up + new Vector3(0, _maxRayRange, 0), Color.green);
Debug.DrawRay(_position, Vector3.down + new Vector3(0, -_maxRayRange, 0), Color.magenta);
Debug.DrawRay(_position, Vector3.right + new Vector3(_tableRayMaxLength, 0, 0), Color.cyan);
Debug.DrawRay(_position, Vector3.left + new Vector3(-_tableRayMaxLength, 0, 0), Color.yellow);
}
}
private void OnDrawGizmos()
{
if (debug)
{
Gizmos.color = Color.blue;
Gizmos.DrawWireSphere(transform.position, _maxSphereRange);
}
}
private void InitializeNeighbours()
{
_nodeLayerMask = LayerMask.GetMask("Node");
_tableLayerMask = LayerMask.GetMask("Table");
_obstacleLayerMask = LayerMask.GetMask("Obstacle");
_position = gameObject.transform.position;
_nodeRayMaxLength = maxRange * 2;
_tableRayMaxLength = maxRange * 2 + 0.5f;
_nodeRayMaxLength = _maxRayRange * 2;
_tableRayMaxLength = _maxRayRange * 2 + 0.5f;
var colliders = Physics.OverlapSphere(transform.position, _maxSphereRange, _obstacleLayerMask);
var obstacleLayer = (int) Math.Log(_obstacleLayerMask, 2);
foreach (Collider otherCollider in colliders)
{
if (otherCollider.gameObject.layer == obstacleLayer)
{
var obstacle = otherCollider.GetComponent<Obstacle>();
var cost = obstacle.GETMovementPenaltyCost();
if (cost > movementPenalty)
movementPenalty = cost;
}
}
if (Physics.Raycast(_position, Vector3.left, out var hitLeft, _nodeRayMaxLength, _nodeLayerMask))
{
var nodeCollider = hitLeft.collider.GetComponent<Node>();
@ -87,14 +148,14 @@ namespace Logic.Graph
neighbors.Add(nodeCollider);
}
if (Physics.Raycast(_position, Vector3.back, out var hitBottom, maxRange * 2, _nodeLayerMask))
if (Physics.Raycast(_position, Vector3.back, out var hitBottom, _maxRayRange * 2, _nodeLayerMask))
{
var nodeCollider = hitBottom.collider.GetComponent<Node>();
if (nodeCollider)
neighbors.Add(nodeCollider);
}
if (Physics.Raycast(_position, Vector3.left, out var hitLeftTable, _tableRayMaxLength, _tableLayerMask))
if (Physics.Raycast(_position, Vector3.left, out var hitLeftTable, _maxTableRayRange, _tableLayerMask))
{
var tableCollider = hitLeftTable.collider.GetComponent<CustomerTable>();
if (tableCollider)
@ -104,7 +165,7 @@ namespace Logic.Graph
neighbors.Add(kitchenTableCollider);
}
if (Physics.Raycast(_position, Vector3.right, out var hitRightTable, _tableRayMaxLength, _tableLayerMask))
if (Physics.Raycast(_position, Vector3.right, out var hitRightTable, _maxTableRayRange, _tableLayerMask))
{
var tableCollider = hitRightTable.collider.GetComponent<CustomerTable>();
if (tableCollider)
@ -113,32 +174,9 @@ namespace Logic.Graph
if (kitchenTableCollider)
neighbors.Add(kitchenTableCollider);
}
}
public Node FindNode(Rotation agentRotation)
{
switch (agentRotation)
{
case Rotation.Left:
return neighbors.FirstOrDefault(x =>
x.transform.position.z.IsEq(transform.position.z) &&
x.transform.position.x.IsEq(transform.position.x - 1));
case Rotation.Right:
return neighbors.FirstOrDefault(x =>
x.transform.position.z.IsEq(transform.position.z) &&
x.transform.position.x.IsEq(transform.position.x + 1));
case Rotation.Top:
return neighbors.FirstOrDefault(x =>
x.transform.position.x.IsEq(transform.position.x) &&
x.transform.position.z.IsEq(transform.position.z + 1.25f));
case Rotation.Bottom:
return neighbors.FirstOrDefault(x =>
x.transform.position.x.IsEq(transform.position.x) &&
x.transform.position.z.IsEq(transform.position.z - 1.25f));
default:
return null;
}
}
}
}

View File

@ -0,0 +1,33 @@
using System.Linq;
using UnityEngine;
namespace Logic.Graph
{
public enum ObstacleType
{
Bar,
Water
}
[System.Serializable]
public class ObstacleData
{
public ObstacleType type;
public int penalty;
}
public class Obstacle : MonoBehaviour
{
[SerializeField] private ObstacleType obstacleType;
public int GETMovementPenaltyCost()
{
var obstacleData = SceneContext.Instance.obstacles.First(x => x.type == obstacleType);
return obstacleData.penalty;
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d9978794eb6647e2972119f5cdf214d6
timeCreated: 1619115607

View File

@ -9,9 +9,10 @@ namespace Logic
public class SceneContext : MonoBehaviour
{
public List<Node> map;
public ObstacleData[] obstacles;
public static SceneContext Instance;
void Start()
void Awake()
{
Instance = this;
Application.targetFrameRate = 144;
@ -44,4 +45,5 @@ namespace Logic
DrawGizmosFrom(map.First(), new List<Node>());
}
}
}

View File

@ -1,327 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2565656631509715975
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2473193917118609049}
- component: {fileID: 7006137836792006186}
- component: {fileID: 2840615025101563930}
m_Layer: 0
m_Name: Box003 1 (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2473193917118609049
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2565656631509715975}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.112, y: 0, z: -0.003}
m_LocalScale: {x: 0.25, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8414219303661129664}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &7006137836792006186
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2565656631509715975}
m_Mesh: {fileID: -7879699026112601197, guid: 021e9ec88d16b31458032ba2efa8a8f8, type: 3}
--- !u!23 &2840615025101563930
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2565656631509715975}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2895064947943234598, guid: 021e9ec88d16b31458032ba2efa8a8f8, type: 3}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &4531242527359874286
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3616825550709111917}
- component: {fileID: 6590821551394932748}
- component: {fileID: 4193079779083189544}
m_Layer: 0
m_Name: Box003 1 (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3616825550709111917
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4531242527359874286}
m_LocalRotation: {x: -0, y: -0, z: 0.7071069, w: 0.70710677}
m_LocalPosition: {x: 0, y: 0.07, z: -0.003}
m_LocalScale: {x: 0.25, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8414219303661129664}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6590821551394932748
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4531242527359874286}
m_Mesh: {fileID: -7879699026112601197, guid: 021e9ec88d16b31458032ba2efa8a8f8, type: 3}
--- !u!23 &4193079779083189544
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4531242527359874286}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2895064947943234598, guid: 021e9ec88d16b31458032ba2efa8a8f8, type: 3}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &9151519995397422379
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1890587839847572155}
- component: {fileID: 6405327285881159784}
- component: {fileID: 3922519392278820502}
m_Layer: 0
m_Name: Box001 1 (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1890587839847572155
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9151519995397422379}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.112, y: 3.215206e-13, z: -0.50625}
m_LocalScale: {x: 0.25, y: 1, z: 0.5}
m_Children: []
m_Father: {fileID: 8414219303661129664}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6405327285881159784
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9151519995397422379}
m_Mesh: {fileID: -2854964736626054917, guid: 021e9ec88d16b31458032ba2efa8a8f8, type: 3}
--- !u!23 &3922519392278820502
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9151519995397422379}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2895064947943234598, guid: 021e9ec88d16b31458032ba2efa8a8f8, type: 3}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1001 &9080035227615361422
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 776743453089281614, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 776743453089281614, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_LocalPosition.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 776743453089281614, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 776743453089281614, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_LocalPosition.z
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 776743453089281614, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_LocalRotation.w
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 776743453089281614, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_LocalRotation.x
value: -0.5
objectReference: {fileID: 0}
- target: {fileID: 776743453089281614, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_LocalRotation.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 776743453089281614, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_LocalRotation.z
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 776743453089281614, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -90
objectReference: {fileID: 0}
- target: {fileID: 776743453089281614, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 776743453089281614, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 90
objectReference: {fileID: 0}
- target: {fileID: 1228394963740553586, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_Name
value: BarCorner
objectReference: {fileID: 0}
- target: {fileID: 4444703243637854825, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_LocalScale.x
value: 0.25
objectReference: {fileID: 0}
- target: {fileID: 4444703243637854825, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_LocalPosition.y
value: 0.118
objectReference: {fileID: 0}
- target: {fileID: 9126687368945354593, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_LocalScale.x
value: 0.25
objectReference: {fileID: 0}
- target: {fileID: 9126687368945354593, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_LocalPosition.y
value: 0.118
objectReference: {fileID: 0}
- target: {fileID: 9126687368945354593, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
propertyPath: m_LocalPosition.z
value: -0.506
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
--- !u!4 &8414219303661129664 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 776743453089281614, guid: 37a2c2f2937091f408bc4a7f9e5923b2, type: 3}
m_PrefabInstance: {fileID: 9080035227615361422}
m_PrefabAsset: {fileID: 0}

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 97b32b60b07a2ca4296022d84adbb3a4
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,71 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &6001426303718084572
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2262144220064471084, guid: a1cb481af773f3c45bda8f2d5f1c0075, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3306161798889408701, guid: a1cb481af773f3c45bda8f2d5f1c0075, type: 3}
propertyPath: m_LocalScale.x
value: 0.35
objectReference: {fileID: 0}
- target: {fileID: 4775359161287261870, guid: a1cb481af773f3c45bda8f2d5f1c0075, type: 3}
propertyPath: m_Name
value: BarShort
objectReference: {fileID: 0}
- target: {fileID: 6453329937250285970, guid: a1cb481af773f3c45bda8f2d5f1c0075, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6453329937250285970, guid: a1cb481af773f3c45bda8f2d5f1c0075, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6453329937250285970, guid: a1cb481af773f3c45bda8f2d5f1c0075, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6453329937250285970, guid: a1cb481af773f3c45bda8f2d5f1c0075, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6453329937250285970, guid: a1cb481af773f3c45bda8f2d5f1c0075, type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 6453329937250285970, guid: a1cb481af773f3c45bda8f2d5f1c0075, type: 3}
propertyPath: m_LocalRotation.x
value: -0.7071068
objectReference: {fileID: 0}
- target: {fileID: 6453329937250285970, guid: a1cb481af773f3c45bda8f2d5f1c0075, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6453329937250285970, guid: a1cb481af773f3c45bda8f2d5f1c0075, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6453329937250285970, guid: a1cb481af773f3c45bda8f2d5f1c0075, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -90
objectReference: {fileID: 0}
- target: {fileID: 6453329937250285970, guid: a1cb481af773f3c45bda8f2d5f1c0075, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6453329937250285970, guid: a1cb481af773f3c45bda8f2d5f1c0075, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7991526901279808949, guid: a1cb481af773f3c45bda8f2d5f1c0075, type: 3}
propertyPath: m_LocalScale.x
value: 0.36
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a1cb481af773f3c45bda8f2d5f1c0075, type: 3}

View File

@ -10,8 +10,10 @@ GameObject:
m_Component:
- component: {fileID: 6453329937250285970}
- component: {fileID: 8315836113623620561}
m_Layer: 0
m_Name: Bar
- component: {fileID: 7059161905270609152}
- component: {fileID: 2089487727296566617}
m_Layer: 9
m_Name: BarObstacle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -44,8 +46,34 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Size: {x: 1, y: 1.1, z: 1.1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &7059161905270609152
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4775359161287261870}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d9978794eb6647e2972119f5cdf214d6, type: 3}
m_Name:
m_EditorClassIdentifier:
obstacleType: 0
--- !u!114 &2089487727296566617
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4775359161287261870}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d9978794eb6647e2972119f5cdf214d6, type: 3}
m_Name:
m_EditorClassIdentifier:
obstacleType: 0
--- !u!1 &7458537012890967998
GameObject:
m_ObjectHideFlags: 0
@ -57,7 +85,7 @@ GameObject:
- component: {fileID: 7991526901279808949}
- component: {fileID: 1683996547186378934}
- component: {fileID: 2262144220064471084}
m_Layer: 0
m_Layer: 9
m_Name: Box003 1
m_TagString: Untagged
m_Icon: {fileID: 0}
@ -72,8 +100,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7458537012890967998}
m_LocalRotation: {x: -0, y: -0, z: 0.7071069, w: 0.70710677}
m_LocalPosition: {x: 0, y: 0, z: -0.003}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalPosition: {x: -0.000000017881, y: 0, z: -0.003}
m_LocalScale: {x: 0.34042966, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6453329937250285970}
m_RootOrder: 1
@ -138,7 +166,7 @@ GameObject:
- component: {fileID: 3306161798889408701}
- component: {fileID: 6386406479627342688}
- component: {fileID: 6930241759494944571}
m_Layer: 0
m_Layer: 9
m_Name: Box001 1
m_TagString: Untagged
m_Icon: {fileID: 0}
@ -153,8 +181,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8706372573158961954}
m_LocalRotation: {x: -0, y: -0, z: 0.7071069, w: 0.70710677}
m_LocalPosition: {x: -0.00000011921, y: 3.215206e-13, z: -0.50625}
m_LocalScale: {x: 1, y: 1, z: 0.5}
m_LocalPosition: {x: -0.00000059678, y: -0.00000044656, z: -0.50938}
m_LocalScale: {x: 0.33080274, y: 1, z: 0.50625}
m_Children: []
m_Father: {fileID: 6453329937250285970}
m_RootOrder: 0

View File

@ -50,7 +50,11 @@ MonoBehaviour:
pathMat: {fileID: 2100000, guid: 1293cff8126771046a5a69f1aa772d65, type: 2}
neighbors: []
maxRange: 0.75
maxSphereRange: 0.25
debug: 0
movementPenalty: 0
hCost: 0
gCost: 0
--- !u!23 &5273760715526374001
MeshRenderer:
m_ObjectHideFlags: 0

View File

@ -0,0 +1,112 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &409510081860761508
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2485448935862418815}
- component: {fileID: 8275326148080597472}
- component: {fileID: 2937641931314369368}
- component: {fileID: 2767194014693675629}
m_Layer: 9
m_Name: WaterObstacle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2485448935862418815
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 409510081860761508}
m_LocalRotation: {x: 0.70710576, y: -0, z: -0, w: 0.70710784}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!212 &8275326148080597472
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 409510081860761508}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 7482667652216324306, guid: db750325989564987a34393247d883b4, type: 3}
m_Color: {r: 0.20518868, g: 0.6832181, b: 0.8207547, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!114 &2937641931314369368
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 409510081860761508}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d9978794eb6647e2972119f5cdf214d6, type: 3}
m_Name:
m_EditorClassIdentifier:
obstacleType: 1
--- !u!65 &2767194014693675629
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 409510081860761508}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 0.01}
m_Center: {x: 0, y: 0, z: 0}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 37a2c2f2937091f408bc4a7f9e5923b2
guid: c5bd8bcb1700f1b48afa7a31549fd36d
PrefabImporter:
externalObjects: {}
userData:

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@ TagManager:
- Walls
- Node
- Table
-
- Obstacle
-
-
-