Compare commits
No commits in common. "d5ea686f2c71e8077e2964013f3df7a90bcc8c56" and "f75695bc4322e73d6e19e82e714180f0b9db76d6" have entirely different histories.
d5ea686f2c
...
f75695bc43
@ -1,158 +0,0 @@
|
|||||||
using Intrepid.Core.Grounding;
|
|
||||||
using Intrepid.Utilities;
|
|
||||||
using Sirenix.OdinInspector;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace __Prototype.Scripts
|
|
||||||
{
|
|
||||||
public class TestGroundMorion : GroundProfileMotion
|
|
||||||
{
|
|
||||||
[GroupConfigurations, SerializeField] private Vector3 localDirection = Vector3.right;
|
|
||||||
[GroupConfigurations, SerializeField] private float speed = 2f;
|
|
||||||
[GroupConfigurations, SerializeField] private float maxDistance = 4f;
|
|
||||||
[GroupConfigurations, SerializeField] private bool pingPong = true;
|
|
||||||
[GroupConfigurations, SerializeField] private bool moveOnStart;
|
|
||||||
|
|
||||||
public override Vector3 Velocity { get; protected set; }
|
|
||||||
public override Vector3 DeltaPosition { get; protected set; }
|
|
||||||
public override bool IsMoving { get; protected set; }
|
|
||||||
public override bool IsStatic { get; protected set; } = false;
|
|
||||||
|
|
||||||
private Vector3 _startPosition;
|
|
||||||
private Vector3 _lastPosition;
|
|
||||||
private int _directionSign = 1;
|
|
||||||
private bool _initialized;
|
|
||||||
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
Snap();
|
|
||||||
|
|
||||||
if (moveOnStart)
|
|
||||||
{
|
|
||||||
Move();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FixedUpdate()
|
|
||||||
{
|
|
||||||
if (!IsMoving)
|
|
||||||
{
|
|
||||||
ClearFrameMotion();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var current = transform.position;
|
|
||||||
|
|
||||||
var worldDirection = transform.TransformDirection(localDirection.normalized);
|
|
||||||
var next = current + worldDirection * (_directionSign * speed * Time.fixedDeltaTime);
|
|
||||||
|
|
||||||
if (maxDistance > 0f)
|
|
||||||
{
|
|
||||||
var distanceFromStart = Vector3.Dot(
|
|
||||||
next - _startPosition,
|
|
||||||
worldDirection
|
|
||||||
);
|
|
||||||
|
|
||||||
if (Mathf.Abs(distanceFromStart) >= maxDistance)
|
|
||||||
{
|
|
||||||
if (pingPong)
|
|
||||||
{
|
|
||||||
_directionSign *= -1;
|
|
||||||
|
|
||||||
var clampedDistance = Mathf.Clamp(
|
|
||||||
distanceFromStart,
|
|
||||||
-maxDistance,
|
|
||||||
maxDistance
|
|
||||||
);
|
|
||||||
|
|
||||||
next = _startPosition + worldDirection * clampedDistance;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
next = _startPosition + worldDirection * Mathf.Sign(distanceFromStart) * maxDistance;
|
|
||||||
Stop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
transform.position = next;
|
|
||||||
|
|
||||||
DeltaPosition = transform.position - _lastPosition;
|
|
||||||
Velocity = DeltaPosition / Time.fixedDeltaTime;
|
|
||||||
|
|
||||||
_lastPosition = transform.position;
|
|
||||||
}
|
|
||||||
|
|
||||||
[GroupDebug, Button(ButtonSizes.Medium)]
|
|
||||||
private void Move()
|
|
||||||
{
|
|
||||||
if (!_initialized)
|
|
||||||
{
|
|
||||||
Snap();
|
|
||||||
}
|
|
||||||
|
|
||||||
IsMoving = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
[GroupDebug, Button(ButtonSizes.Medium)]
|
|
||||||
private void Stop()
|
|
||||||
{
|
|
||||||
IsMoving = false;
|
|
||||||
ClearFrameMotion();
|
|
||||||
}
|
|
||||||
|
|
||||||
[GroupDebug, Button(ButtonSizes.Medium)]
|
|
||||||
private void Reverse()
|
|
||||||
{
|
|
||||||
_directionSign *= -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
[GroupDebug, Button(ButtonSizes.Medium)]
|
|
||||||
private void Snap()
|
|
||||||
{
|
|
||||||
_startPosition = transform.position;
|
|
||||||
_lastPosition = transform.position;
|
|
||||||
_directionSign = 1;
|
|
||||||
ClearFrameMotion();
|
|
||||||
_initialized = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
[GroupDebug, Button(ButtonSizes.Medium)]
|
|
||||||
private void ResetToStart()
|
|
||||||
{
|
|
||||||
transform.position = _startPosition;
|
|
||||||
_lastPosition = transform.position;
|
|
||||||
_directionSign = 1;
|
|
||||||
ClearFrameMotion();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ClearFrameMotion()
|
|
||||||
{
|
|
||||||
DeltaPosition = Vector3.zero;
|
|
||||||
Velocity = Vector3.zero;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
|
||||||
private void OnDrawGizmosSelected()
|
|
||||||
{
|
|
||||||
var origin = _initialized ? _startPosition : transform.position;
|
|
||||||
var worldDirection = transform.TransformDirection(localDirection.normalized);
|
|
||||||
|
|
||||||
Gizmos.color = Color.green;
|
|
||||||
Gizmos.DrawLine(
|
|
||||||
origin - worldDirection * maxDistance,
|
|
||||||
origin + worldDirection * maxDistance
|
|
||||||
);
|
|
||||||
|
|
||||||
Gizmos.DrawSphere(origin - worldDirection * maxDistance, 0.08f);
|
|
||||||
Gizmos.DrawSphere(origin + worldDirection * maxDistance, 0.08f);
|
|
||||||
|
|
||||||
Gizmos.color = Color.cyan;
|
|
||||||
Gizmos.DrawLine(
|
|
||||||
transform.position,
|
|
||||||
transform.position + Velocity
|
|
||||||
);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 52f9a25d1be7481baf4085a7b34ef8bb
|
|
||||||
timeCreated: 1781278946
|
|
||||||
@ -36,8 +36,8 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 0}
|
m_AnchorMax: {x: 1, y: 0}
|
||||||
m_AnchoredPosition: {x: 45, y: 30}
|
m_AnchoredPosition: {x: 0, y: 10}
|
||||||
m_SizeDelta: {x: -110, y: 20}
|
m_SizeDelta: {x: -20, y: 30}
|
||||||
m_Pivot: {x: 0.5, y: 0}
|
m_Pivot: {x: 0.5, y: 0}
|
||||||
--- !u!222 &3109608898981227386
|
--- !u!222 &3109608898981227386
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
@ -111,7 +111,7 @@ RectTransform:
|
|||||||
m_AnchorMin: {x: 1, y: 0}
|
m_AnchorMin: {x: 1, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 0}
|
m_AnchorMax: {x: 1, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 90, y: 125}
|
m_SizeDelta: {x: 125, y: 175}
|
||||||
m_Pivot: {x: 1, y: 0}
|
m_Pivot: {x: 1, y: 0}
|
||||||
--- !u!1 &1210064884852877568
|
--- !u!1 &1210064884852877568
|
||||||
GameObject:
|
GameObject:
|
||||||
@ -152,7 +152,7 @@ RectTransform:
|
|||||||
m_AnchorMin: {x: 0.5, y: 0}
|
m_AnchorMin: {x: 0.5, y: 0}
|
||||||
m_AnchorMax: {x: 0.5, y: 0}
|
m_AnchorMax: {x: 0.5, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 20}
|
m_AnchoredPosition: {x: 0, y: 20}
|
||||||
m_SizeDelta: {x: 474, y: 126}
|
m_SizeDelta: {x: 750, y: 175}
|
||||||
m_Pivot: {x: 0.5, y: 0}
|
m_Pivot: {x: 0.5, y: 0}
|
||||||
--- !u!225 &5362238856615007216
|
--- !u!225 &5362238856615007216
|
||||||
CanvasGroup:
|
CanvasGroup:
|
||||||
@ -359,7 +359,7 @@ RectTransform:
|
|||||||
m_AnchorMin: {x: 0.5, y: 0}
|
m_AnchorMin: {x: 0.5, y: 0}
|
||||||
m_AnchorMax: {x: 0.5, y: 0}
|
m_AnchorMax: {x: 0.5, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 300, y: 125}
|
m_SizeDelta: {x: 500, y: 175}
|
||||||
m_Pivot: {x: 0.5, y: 0}
|
m_Pivot: {x: 0.5, y: 0}
|
||||||
--- !u!1 &2169731595684440506
|
--- !u!1 &2169731595684440506
|
||||||
GameObject:
|
GameObject:
|
||||||
@ -655,10 +655,10 @@ RectTransform:
|
|||||||
- {fileID: 8639643552490286096}
|
- {fileID: 8639643552490286096}
|
||||||
m_Father: {fileID: 8347068417609933848}
|
m_Father: {fileID: 8347068417609933848}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0}
|
m_AnchorMin: {x: 1, y: 1}
|
||||||
m_AnchorMax: {x: 0.5, y: 0}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: 5}
|
m_AnchoredPosition: {x: -135, y: -5}
|
||||||
m_SizeDelta: {x: 270, y: 50}
|
m_SizeDelta: {x: 225, y: 50}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!1 &4797126571072361863
|
--- !u!1 &4797126571072361863
|
||||||
GameObject:
|
GameObject:
|
||||||
@ -694,7 +694,7 @@ RectTransform:
|
|||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 90, y: 125}
|
m_SizeDelta: {x: 125, y: 175}
|
||||||
m_Pivot: {x: 0, y: 0}
|
m_Pivot: {x: 0, y: 0}
|
||||||
--- !u!1 &5379922815610353284
|
--- !u!1 &5379922815610353284
|
||||||
GameObject:
|
GameObject:
|
||||||
@ -805,8 +805,8 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0.5}
|
m_AnchorMin: {x: 0, y: 0.5}
|
||||||
m_AnchorMax: {x: 1, y: 0.5}
|
m_AnchorMax: {x: 1, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 45, y: 20}
|
m_AnchoredPosition: {x: 60, y: 20}
|
||||||
m_SizeDelta: {x: -110, y: 50}
|
m_SizeDelta: {x: -140, y: 50}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &1510678006662779526
|
--- !u!222 &1510678006662779526
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
@ -863,8 +863,8 @@ MonoBehaviour:
|
|||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 24
|
m_fontSize: 36
|
||||||
m_fontSizeBase: 24
|
m_fontSizeBase: 36
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 0
|
m_enableAutoSizing: 0
|
||||||
m_fontSizeMin: 18
|
m_fontSizeMin: 18
|
||||||
@ -1380,7 +1380,7 @@ RectTransform:
|
|||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: 10, y: -10}
|
m_AnchoredPosition: {x: 10, y: -10}
|
||||||
m_SizeDelta: {x: 80, y: 80}
|
m_SizeDelta: {x: 110, y: 110}
|
||||||
m_Pivot: {x: 0, y: 1}
|
m_Pivot: {x: 0, y: 1}
|
||||||
--- !u!222 &7932382647549546298
|
--- !u!222 &7932382647549546298
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
@ -1596,7 +1596,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4122311943219390533, guid: 18f44b986d2754181a3a9695f6898774, type: 3}
|
- target: {fileID: 4122311943219390533, guid: 18f44b986d2754181a3a9695f6898774, type: 3}
|
||||||
propertyPath: m_SizeDelta.y
|
propertyPath: m_SizeDelta.y
|
||||||
value: 80
|
value: 110
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4122311943219390533, guid: 18f44b986d2754181a3a9695f6898774, type: 3}
|
- target: {fileID: 4122311943219390533, guid: 18f44b986d2754181a3a9695f6898774, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
@ -1968,7 +1968,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4122311943219390533, guid: 18f44b986d2754181a3a9695f6898774, type: 3}
|
- target: {fileID: 4122311943219390533, guid: 18f44b986d2754181a3a9695f6898774, type: 3}
|
||||||
propertyPath: m_SizeDelta.y
|
propertyPath: m_SizeDelta.y
|
||||||
value: 80
|
value: 110
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4122311943219390533, guid: 18f44b986d2754181a3a9695f6898774, type: 3}
|
- target: {fileID: 4122311943219390533, guid: 18f44b986d2754181a3a9695f6898774, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
|
|||||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 671522e89c004981804e95c2e4772ba4, type: 3}
|
m_Script: {fileID: 11500000, guid: 671522e89c004981804e95c2e4772ba4, type: 3}
|
||||||
m_Name: action-belt.window.data
|
m_Name: action-belt.window.data
|
||||||
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowData
|
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowData
|
||||||
id: a35f38b0d2af466c9b0557c538c1f733
|
id: 69910a851d784149bbba17e5e0dd026a
|
||||||
shouldBeKeptAlwaysEnabled: 1
|
shouldBeKeptAlwaysEnabled: 1
|
||||||
onEntry: {fileID: 11400000, guid: b12d41919e089475da15bef8808f80b8, type: 2}
|
onEntry: {fileID: 11400000, guid: b12d41919e089475da15bef8808f80b8, type: 2}
|
||||||
onExit: {fileID: 11400000, guid: 86176d631377e4d5fba70988ef37e9d9, type: 2}
|
onExit: {fileID: 11400000, guid: 86176d631377e4d5fba70988ef37e9d9, type: 2}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 6f2337b04d5e44dba892ac6b72ae7e44, type: 3}
|
m_Script: {fileID: 11500000, guid: 6f2337b04d5e44dba892ac6b72ae7e44, type: 3}
|
||||||
m_Name: action-belt.window.enter
|
m_Name: action-belt.window.enter
|
||||||
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowAnimationData
|
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowAnimationData
|
||||||
mode: 0
|
mode: 1
|
||||||
direction: 0
|
direction: 0
|
||||||
soundEffect: {fileID: 0}
|
soundEffect: {fileID: 0}
|
||||||
animationSpeed: 2
|
animationSpeed: 5
|
||||||
|
|||||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 6f2337b04d5e44dba892ac6b72ae7e44, type: 3}
|
m_Script: {fileID: 11500000, guid: 6f2337b04d5e44dba892ac6b72ae7e44, type: 3}
|
||||||
m_Name: action-belt.window.exit
|
m_Name: action-belt.window.exit
|
||||||
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowAnimationData
|
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowAnimationData
|
||||||
mode: 0
|
mode: 1
|
||||||
direction: 1
|
direction: 1
|
||||||
soundEffect: {fileID: 0}
|
soundEffect: {fileID: 0}
|
||||||
animationSpeed: 2
|
animationSpeed: 5
|
||||||
|
|||||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 671522e89c004981804e95c2e4772ba4, type: 3}
|
m_Script: {fileID: 11500000, guid: 671522e89c004981804e95c2e4772ba4, type: 3}
|
||||||
m_Name: world-overlay.window.data
|
m_Name: world-overlay.window.data
|
||||||
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowData
|
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowData
|
||||||
id: f37754ed82f84d13b3ff890b11fc7c83
|
id: d9f8d3559eb2489cb94739ed883d3360
|
||||||
shouldBeKeptAlwaysEnabled: 0
|
shouldBeKeptAlwaysEnabled: 0
|
||||||
onEntry: {fileID: 11400000, guid: 82f061381bd6041e89c7a94e57153999, type: 2}
|
onEntry: {fileID: 11400000, guid: 82f061381bd6041e89c7a94e57153999, type: 2}
|
||||||
onExit: {fileID: 11400000, guid: 645c3f5b37b664fe2be06cdff30c678a, type: 2}
|
onExit: {fileID: 11400000, guid: 645c3f5b37b664fe2be06cdff30c678a, type: 2}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 6f2337b04d5e44dba892ac6b72ae7e44, type: 3}
|
m_Script: {fileID: 11500000, guid: 6f2337b04d5e44dba892ac6b72ae7e44, type: 3}
|
||||||
m_Name: world-overlay.window.enter
|
m_Name: world-overlay.window.enter
|
||||||
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowAnimationData
|
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowAnimationData
|
||||||
mode: 3
|
mode: 1
|
||||||
direction: 0
|
direction: 0
|
||||||
soundEffect: {fileID: 0}
|
soundEffect: {fileID: 0}
|
||||||
animationSpeed: 2
|
animationSpeed: 5
|
||||||
|
|||||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 6f2337b04d5e44dba892ac6b72ae7e44, type: 3}
|
m_Script: {fileID: 11500000, guid: 6f2337b04d5e44dba892ac6b72ae7e44, type: 3}
|
||||||
m_Name: world-overlay.window.exit
|
m_Name: world-overlay.window.exit
|
||||||
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowAnimationData
|
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowAnimationData
|
||||||
mode: 2
|
mode: 1
|
||||||
direction: 1
|
direction: 1
|
||||||
soundEffect: {fileID: 0}
|
soundEffect: {fileID: 0}
|
||||||
animationSpeed: 10
|
animationSpeed: 5
|
||||||
|
|||||||
@ -1270,11 +1270,6 @@ Transform:
|
|||||||
- {fileID: 1383643367}
|
- {fileID: 1383643367}
|
||||||
m_Father: {fileID: 1187971236}
|
m_Father: {fileID: 1187971236}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &67093088 stripped
|
|
||||||
GameObject:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 6524376507900539265, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 1977728341}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!1 &115233784
|
--- !u!1 &115233784
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -1442,8 +1437,9 @@ GameObject:
|
|||||||
- component: {fileID: 152751379}
|
- component: {fileID: 152751379}
|
||||||
- component: {fileID: 152751382}
|
- component: {fileID: 152751382}
|
||||||
- component: {fileID: 152751381}
|
- component: {fileID: 152751381}
|
||||||
|
- component: {fileID: 152751380}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: Canvas 1024 x 576
|
m_Name: Canvas 1024 x 720
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@ -1470,6 +1466,21 @@ RectTransform:
|
|||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0, y: 0}
|
m_Pivot: {x: 0, y: 0}
|
||||||
|
--- !u!114 &152751380
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 152751378}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d8d6bcfd7fe44d6c89229eb87c0a3296, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.WindowController
|
||||||
|
subscriptionId: 384b1ac19e1a4cbfb6313e530996fd76
|
||||||
|
initialWindows: []
|
||||||
|
firstFocusItem: {fileID: 0}
|
||||||
--- !u!114 &152751381
|
--- !u!114 &152751381
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -1485,7 +1496,7 @@ MonoBehaviour:
|
|||||||
m_UiScaleMode: 1
|
m_UiScaleMode: 1
|
||||||
m_ReferencePixelsPerUnit: 64
|
m_ReferencePixelsPerUnit: 64
|
||||||
m_ScaleFactor: 1
|
m_ScaleFactor: 1
|
||||||
m_ReferenceResolution: {x: 1024, y: 576}
|
m_ReferenceResolution: {x: 1024, y: 720}
|
||||||
m_ScreenMatchMode: 0
|
m_ScreenMatchMode: 0
|
||||||
m_MatchWidthOrHeight: 0.5
|
m_MatchWidthOrHeight: 0.5
|
||||||
m_PhysicalUnit: 3
|
m_PhysicalUnit: 3
|
||||||
@ -1756,7 +1767,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 23906060}
|
objectReference: {fileID: 23906060}
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
||||||
propertyPath: m_VersionIndex
|
propertyPath: m_VersionIndex
|
||||||
value: 337
|
value: 331
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
||||||
propertyPath: m_Tangents.Array.size
|
propertyPath: m_Tangents.Array.size
|
||||||
@ -2166,7 +2177,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 1485618350}
|
objectReference: {fileID: 1485618350}
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
||||||
propertyPath: m_VersionIndex
|
propertyPath: m_VersionIndex
|
||||||
value: 282
|
value: 276
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
||||||
propertyPath: m_Tangents.Array.size
|
propertyPath: m_Tangents.Array.size
|
||||||
@ -2671,41 +2682,8 @@ Transform:
|
|||||||
- {fileID: 1629937738}
|
- {fileID: 1629937738}
|
||||||
- {fileID: 1501201613}
|
- {fileID: 1501201613}
|
||||||
- {fileID: 651339733}
|
- {fileID: 651339733}
|
||||||
- {fileID: 332227168}
|
|
||||||
m_Father: {fileID: 1187971236}
|
m_Father: {fileID: 1187971236}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &332227167
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 332227168}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: Platforms
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!4 &332227168
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 332227167}
|
|
||||||
serializedVersion: 2
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children:
|
|
||||||
- {fileID: 1977728342}
|
|
||||||
m_Father: {fileID: 320298439}
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!1 &347886466
|
--- !u!1 &347886466
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -3079,7 +3057,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 7028820}
|
objectReference: {fileID: 7028820}
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
||||||
propertyPath: m_VersionIndex
|
propertyPath: m_VersionIndex
|
||||||
value: 315
|
value: 309
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
||||||
propertyPath: m_Tangents.Array.size
|
propertyPath: m_Tangents.Array.size
|
||||||
@ -4519,7 +4497,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 48094519}
|
objectReference: {fileID: 48094519}
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
||||||
propertyPath: m_VersionIndex
|
propertyPath: m_VersionIndex
|
||||||
value: 337
|
value: 331
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
||||||
propertyPath: m_Tangents.Array.size
|
propertyPath: m_Tangents.Array.size
|
||||||
@ -5209,7 +5187,7 @@ Camera:
|
|||||||
near clip plane: 0.1
|
near clip plane: 0.1
|
||||||
far clip plane: 5000
|
far clip plane: 5000
|
||||||
field of view: 40
|
field of view: 40
|
||||||
orthographic: 0
|
orthographic: 1
|
||||||
orthographic size: 7
|
orthographic size: 7
|
||||||
m_Depth: 0
|
m_Depth: 0
|
||||||
m_CullingMask:
|
m_CullingMask:
|
||||||
@ -5693,7 +5671,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 1367132531}
|
objectReference: {fileID: 1367132531}
|
||||||
- target: {fileID: 4461476242845816847, guid: d5f09e3d9ca134424b1900c7865fca19, type: 3}
|
- target: {fileID: 4461476242845816847, guid: d5f09e3d9ca134424b1900c7865fca19, type: 3}
|
||||||
propertyPath: m_VersionIndex
|
propertyPath: m_VersionIndex
|
||||||
value: 509
|
value: 503
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4461476242845816847, guid: d5f09e3d9ca134424b1900c7865fca19, type: 3}
|
- target: {fileID: 4461476242845816847, guid: d5f09e3d9ca134424b1900c7865fca19, type: 3}
|
||||||
propertyPath: m_Faces.Array.size
|
propertyPath: m_Faces.Array.size
|
||||||
@ -6835,7 +6813,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 929953728}
|
objectReference: {fileID: 929953728}
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
||||||
propertyPath: m_VersionIndex
|
propertyPath: m_VersionIndex
|
||||||
value: 282
|
value: 276
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
||||||
propertyPath: m_Tangents.Array.size
|
propertyPath: m_Tangents.Array.size
|
||||||
@ -7179,8 +7157,8 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0}
|
m_AnchorMin: {x: 0.5, y: 0}
|
||||||
m_AnchorMax: {x: 0.5, y: 0}
|
m_AnchorMax: {x: 0.5, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 50}
|
m_AnchoredPosition: {x: 0, y: 20}
|
||||||
m_SizeDelta: {x: 474, y: 126}
|
m_SizeDelta: {x: 750, y: 175}
|
||||||
m_Pivot: {x: 0.5, y: 0}
|
m_Pivot: {x: 0.5, y: 0}
|
||||||
--- !u!1001 &1143872955
|
--- !u!1001 &1143872955
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
@ -7204,7 +7182,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 487086061}
|
objectReference: {fileID: 487086061}
|
||||||
- target: {fileID: 4461476242845816847, guid: d5f09e3d9ca134424b1900c7865fca19, type: 3}
|
- target: {fileID: 4461476242845816847, guid: d5f09e3d9ca134424b1900c7865fca19, type: 3}
|
||||||
propertyPath: m_VersionIndex
|
propertyPath: m_VersionIndex
|
||||||
value: 429
|
value: 423
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4461476242845816847, guid: d5f09e3d9ca134424b1900c7865fca19, type: 3}
|
- target: {fileID: 4461476242845816847, guid: d5f09e3d9ca134424b1900c7865fca19, type: 3}
|
||||||
propertyPath: m_Faces.Array.size
|
propertyPath: m_Faces.Array.size
|
||||||
@ -12576,7 +12554,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 1769321392}
|
objectReference: {fileID: 1769321392}
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
||||||
propertyPath: m_VersionIndex
|
propertyPath: m_VersionIndex
|
||||||
value: 282
|
value: 276
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
||||||
propertyPath: m_Tangents.Array.size
|
propertyPath: m_Tangents.Array.size
|
||||||
@ -22079,7 +22057,6 @@ MonoBehaviour:
|
|||||||
KnockoutTimeMultiplier: 0.1
|
KnockoutTimeMultiplier: 0.1
|
||||||
knockdownTime: 0.1
|
knockdownTime: 0.1
|
||||||
recoverTime: 0.5
|
recoverTime: 0.5
|
||||||
maxKnockdown: 15
|
|
||||||
--- !u!1 &1450430340
|
--- !u!1 &1450430340
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -22351,10 +22328,6 @@ MonoBehaviour:
|
|||||||
groundMask:
|
groundMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 2147483648
|
m_Bits: 2147483648
|
||||||
inheritGroundMotionY: 0
|
|
||||||
preserveGroundVelocityWhenUngrounded: 1
|
|
||||||
inheritedGroundVelocityDuration: 0.18
|
|
||||||
inheritedGroundVelocityDecay: 30
|
|
||||||
groundCheckHeight: 1
|
groundCheckHeight: 1
|
||||||
groundCheckDistance: 3
|
groundCheckDistance: 3
|
||||||
groundOffset: 0
|
groundOffset: 0
|
||||||
@ -22604,6 +22577,7 @@ GameObject:
|
|||||||
- component: {fileID: 1497838090}
|
- component: {fileID: 1497838090}
|
||||||
- component: {fileID: 1497838091}
|
- component: {fileID: 1497838091}
|
||||||
- component: {fileID: 1497838092}
|
- component: {fileID: 1497838092}
|
||||||
|
- component: {fileID: 1497838093}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: Canvas 1920 x 1080
|
m_Name: Canvas 1920 x 1080
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -22677,6 +22651,22 @@ MonoBehaviour:
|
|||||||
m_DefaultSpriteDPI: 96
|
m_DefaultSpriteDPI: 96
|
||||||
m_DynamicPixelsPerUnit: 1
|
m_DynamicPixelsPerUnit: 1
|
||||||
m_PresetInfoIsWorld: 0
|
m_PresetInfoIsWorld: 0
|
||||||
|
--- !u!114 &1497838093
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1497838089}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d8d6bcfd7fe44d6c89229eb87c0a3296, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.WindowController
|
||||||
|
subscriptionId: 02a717f284a84688bbee601879230537
|
||||||
|
initialWindows:
|
||||||
|
- {fileID: 1953131096}
|
||||||
|
firstFocusItem: {fileID: 0}
|
||||||
--- !u!1 &1501201612
|
--- !u!1 &1501201612
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -24145,184 +24135,6 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier: Assembly-CSharp::Intrepid.Gameplay.Entities.Sentinel.StateMachine.SentinelStateMachine
|
m_EditorClassIdentifier: Assembly-CSharp::Intrepid.Gameplay.Entities.Sentinel.StateMachine.SentinelStateMachine
|
||||||
currentState: 0
|
currentState: 0
|
||||||
lastState: 0
|
lastState: 0
|
||||||
--- !u!43 &1854535944
|
|
||||||
Mesh:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_Name: pb_Mesh-57142
|
|
||||||
serializedVersion: 12
|
|
||||||
m_SubMeshes:
|
|
||||||
- serializedVersion: 2
|
|
||||||
firstByte: 0
|
|
||||||
indexCount: 36
|
|
||||||
topology: 0
|
|
||||||
baseVertex: 0
|
|
||||||
firstVertex: 0
|
|
||||||
vertexCount: 24
|
|
||||||
localAABB:
|
|
||||||
m_Center: {x: 0, y: 0, z: 0}
|
|
||||||
m_Extent: {x: 4, y: 0.25, z: 4}
|
|
||||||
m_Shapes:
|
|
||||||
vertices: []
|
|
||||||
shapes: []
|
|
||||||
channels: []
|
|
||||||
fullWeights: []
|
|
||||||
m_BindPose: []
|
|
||||||
m_BoneNameHashes:
|
|
||||||
m_RootBoneNameHash: 0
|
|
||||||
m_BonesAABB: []
|
|
||||||
m_VariableBoneCountWeights:
|
|
||||||
m_Data:
|
|
||||||
m_MeshCompression: 0
|
|
||||||
m_IsReadable: 1
|
|
||||||
m_KeepVertices: 1
|
|
||||||
m_KeepIndices: 1
|
|
||||||
m_IndexFormat: 0
|
|
||||||
m_IndexBuffer: 000001000200010003000200040005000600050007000600080009000a0009000b000a000c000d000e000d000f000e00100011001200110013001200140015001600150017001600
|
|
||||||
m_VertexData:
|
|
||||||
serializedVersion: 3
|
|
||||||
m_VertexCount: 24
|
|
||||||
m_Channels:
|
|
||||||
- stream: 0
|
|
||||||
offset: 0
|
|
||||||
format: 0
|
|
||||||
dimension: 3
|
|
||||||
- stream: 0
|
|
||||||
offset: 12
|
|
||||||
format: 0
|
|
||||||
dimension: 3
|
|
||||||
- stream: 0
|
|
||||||
offset: 24
|
|
||||||
format: 0
|
|
||||||
dimension: 4
|
|
||||||
- stream: 0
|
|
||||||
offset: 0
|
|
||||||
format: 0
|
|
||||||
dimension: 0
|
|
||||||
- stream: 0
|
|
||||||
offset: 40
|
|
||||||
format: 0
|
|
||||||
dimension: 2
|
|
||||||
- stream: 0
|
|
||||||
offset: 0
|
|
||||||
format: 0
|
|
||||||
dimension: 0
|
|
||||||
- stream: 0
|
|
||||||
offset: 0
|
|
||||||
format: 0
|
|
||||||
dimension: 0
|
|
||||||
- stream: 0
|
|
||||||
offset: 0
|
|
||||||
format: 0
|
|
||||||
dimension: 0
|
|
||||||
- stream: 0
|
|
||||||
offset: 0
|
|
||||||
format: 0
|
|
||||||
dimension: 0
|
|
||||||
- stream: 0
|
|
||||||
offset: 0
|
|
||||||
format: 0
|
|
||||||
dimension: 0
|
|
||||||
- stream: 0
|
|
||||||
offset: 0
|
|
||||||
format: 0
|
|
||||||
dimension: 0
|
|
||||||
- stream: 0
|
|
||||||
offset: 0
|
|
||||||
format: 0
|
|
||||||
dimension: 0
|
|
||||||
- stream: 0
|
|
||||||
offset: 0
|
|
||||||
format: 0
|
|
||||||
dimension: 0
|
|
||||||
- stream: 0
|
|
||||||
offset: 0
|
|
||||||
format: 0
|
|
||||||
dimension: 0
|
|
||||||
m_DataSize: 1152
|
|
||||||
_typelessdata: 000080c0000080be0000804000000000000000000000803f000080bf0000000000000000000080bf000000410000003f00008040000080be0000804000000000000000000000803f000080bf0000000000000000000080bf000000000000003f000080c00000803e0000804000000000000000000000803f000080bf0000000000000000000080bf000000410000803f000080400000803e0000804000000000000000000000803f000080bf0000000000000000000080bf000000000000803f00008040000080be000080400000803f000000000000000000000000000000000000803f000080bf000000410000003f00008040000080be000080c00000803f000000000000000000000000000000000000803f000080bf000000000000003f000080400000803e000080400000803f000000000000000000000000000000000000803f000080bf000000410000803f000080400000803e000080c00000803f000000000000000000000000000000000000803f000080bf000000000000803f00008040000080be000080c00000000000000000000080bf0000803f0000000000000000000080bf000000410000003f000080c0000080be000080c00000000000000000000080bf0000803f0000000000000000000080bf000000000000003f000080400000803e000080c00000000000000000000080bf0000803f0000000000000000000080bf000000410000803f000080c00000803e000080c00000000000000000000080bf0000803f0000000000000000000080bf000000000000803f000080c0000080be000080c0000080bf00000000000000000000000000000000000080bf000080bf000000410000003f000080c0000080be00008040000080bf00000000000000000000000000000000000080bf000080bf000000000000003f000080c00000803e000080c0000080bf00000000000000000000000000000000000080bf000080bf000000410000803f000080c00000803e00008040000080bf00000000000000000000000000000000000080bf000080bf000000000000803f000080c00000803e00008040000000000000803f000000000000803f0000000000000000000080bf000000000000803f000080400000803e00008040000000000000803f000000000000803f0000000000000000000080bf000000410000803f000080c00000803e000080c0000000000000803f000000000000803f0000000000000000000080bf000000000000e0c0000080400000803e000080c0000000000000803f000000000000803f0000000000000000000080bf000000410000e0c0000080c0000080be000080c000000000000080bf00000000000080bf0000000000000000000080bf000000410000e0c000008040000080be000080c000000000000080bf00000000000080bf0000000000000000000080bf000000000000e0c0000080c0000080be0000804000000000000080bf00000000000080bf0000000000000000000080bf000000410000803f00008040000080be0000804000000000000080bf00000000000080bf0000000000000000000080bf000000000000803f
|
|
||||||
m_CompressedMesh:
|
|
||||||
m_Vertices:
|
|
||||||
m_NumItems: 0
|
|
||||||
m_Range: 0
|
|
||||||
m_Start: 0
|
|
||||||
m_Data:
|
|
||||||
m_BitSize: 0
|
|
||||||
m_UV:
|
|
||||||
m_NumItems: 0
|
|
||||||
m_Range: 0
|
|
||||||
m_Start: 0
|
|
||||||
m_Data:
|
|
||||||
m_BitSize: 0
|
|
||||||
m_Normals:
|
|
||||||
m_NumItems: 0
|
|
||||||
m_Range: 0
|
|
||||||
m_Start: 0
|
|
||||||
m_Data:
|
|
||||||
m_BitSize: 0
|
|
||||||
m_Tangents:
|
|
||||||
m_NumItems: 0
|
|
||||||
m_Range: 0
|
|
||||||
m_Start: 0
|
|
||||||
m_Data:
|
|
||||||
m_BitSize: 0
|
|
||||||
m_Weights:
|
|
||||||
m_NumItems: 0
|
|
||||||
m_Data:
|
|
||||||
m_BitSize: 0
|
|
||||||
m_NormalSigns:
|
|
||||||
m_NumItems: 0
|
|
||||||
m_Data:
|
|
||||||
m_BitSize: 0
|
|
||||||
m_TangentSigns:
|
|
||||||
m_NumItems: 0
|
|
||||||
m_Data:
|
|
||||||
m_BitSize: 0
|
|
||||||
m_FloatColors:
|
|
||||||
m_NumItems: 0
|
|
||||||
m_Range: 0
|
|
||||||
m_Start: 0
|
|
||||||
m_Data:
|
|
||||||
m_BitSize: 0
|
|
||||||
m_BoneIndices:
|
|
||||||
m_NumItems: 0
|
|
||||||
m_Data:
|
|
||||||
m_BitSize: 0
|
|
||||||
m_Triangles:
|
|
||||||
m_NumItems: 0
|
|
||||||
m_Data:
|
|
||||||
m_BitSize: 0
|
|
||||||
m_UVInfo: 0
|
|
||||||
m_LocalAABB:
|
|
||||||
m_Center: {x: 0, y: 0, z: 0}
|
|
||||||
m_Extent: {x: 4, y: 0.25, z: 4}
|
|
||||||
m_MeshUsageFlags: 0
|
|
||||||
m_CookingOptions: 30
|
|
||||||
m_BakedConvexCollisionMesh:
|
|
||||||
m_BakedTriangleCollisionMesh:
|
|
||||||
'm_MeshMetrics[0]': 1
|
|
||||||
'm_MeshMetrics[1]': 1
|
|
||||||
m_MeshOptimizationFlags: 1
|
|
||||||
m_StreamData:
|
|
||||||
serializedVersion: 2
|
|
||||||
offset: 0
|
|
||||||
size: 0
|
|
||||||
path:
|
|
||||||
m_MeshLodInfo:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_LodSelectionCurve:
|
|
||||||
serializedVersion: 1
|
|
||||||
m_LodSlope: 0
|
|
||||||
m_LodBias: 0
|
|
||||||
m_NumLevels: 1
|
|
||||||
m_SubMeshes:
|
|
||||||
- serializedVersion: 2
|
|
||||||
m_Levels:
|
|
||||||
- serializedVersion: 1
|
|
||||||
m_IndexStart: 0
|
|
||||||
m_IndexCount: 0
|
|
||||||
--- !u!1 &1869388369
|
--- !u!1 &1869388369
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -24590,7 +24402,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 571221644}
|
objectReference: {fileID: 571221644}
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
||||||
propertyPath: m_VersionIndex
|
propertyPath: m_VersionIndex
|
||||||
value: 326
|
value: 320
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
||||||
propertyPath: m_Tangents.Array.size
|
propertyPath: m_Tangents.Array.size
|
||||||
@ -25015,153 +24827,6 @@ CanvasGroup:
|
|||||||
m_Interactable: 1
|
m_Interactable: 1
|
||||||
m_BlocksRaycasts: 1
|
m_BlocksRaycasts: 1
|
||||||
m_IgnoreParentGroups: 0
|
m_IgnoreParentGroups: 0
|
||||||
--- !u!1001 &1977728341
|
|
||||||
PrefabInstance:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Modification:
|
|
||||||
serializedVersion: 3
|
|
||||||
m_TransformParent: {fileID: 332227168}
|
|
||||||
m_Modifications:
|
|
||||||
- target: {fileID: 101776470001583037, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: groundProfileMotion
|
|
||||||
value:
|
|
||||||
objectReference: {fileID: 1977728344}
|
|
||||||
- target: {fileID: 1597087542051609407, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: sizeX
|
|
||||||
value: 8
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1597087542051609407, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: sizeZ
|
|
||||||
value: 8
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2109134711161568785, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2109134711161568785, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2109134711161568785, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.z
|
|
||||||
value: -27.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2109134711161568785, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.w
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2109134711161568785, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2109134711161568785, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2109134711161568785, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2109134711161568785, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2109134711161568785, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2109134711161568785, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_Mesh
|
|
||||||
value:
|
|
||||||
objectReference: {fileID: 1854535944}
|
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_VersionIndex
|
|
||||||
value: 265
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_Tangents.Array.size
|
|
||||||
value: 24
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_Textures0.Array.size
|
|
||||||
value: 24
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_Faces.Array.data[0].m_Uv.m_Anchor
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_Faces.Array.data[1].m_Uv.m_Anchor
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_Faces.Array.data[2].m_Uv.m_Anchor
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_Faces.Array.data[3].m_Uv.m_Anchor
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_Faces.Array.data[4].m_Uv.m_Anchor
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_Faces.Array.data[5].m_Uv.m_Anchor
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 6392326082573612157, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_Size.x
|
|
||||||
value: 8
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 6392326082573612157, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_Size.z
|
|
||||||
value: 8
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 6524376507900539265, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_Name
|
|
||||||
value: Ground_Slab_Prototype
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 7186094041257591047, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
propertyPath: m_Mesh
|
|
||||||
value:
|
|
||||||
objectReference: {fileID: 1854535944}
|
|
||||||
m_RemovedComponents: []
|
|
||||||
m_RemovedGameObjects: []
|
|
||||||
m_AddedGameObjects: []
|
|
||||||
m_AddedComponents:
|
|
||||||
- targetCorrespondingSourceObject: {fileID: 6524376507900539265, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
insertIndex: -1
|
|
||||||
addedObject: {fileID: 1977728344}
|
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
--- !u!4 &1977728342 stripped
|
|
||||||
Transform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 2109134711161568785, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 1977728341}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!114 &1977728344
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 67093088}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 52f9a25d1be7481baf4085a7b34ef8bb, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::__Prototype.Scripts.TestGroundMorion
|
|
||||||
id: 72244c182c1b4b7f8026c837d732ae79
|
|
||||||
localDirection: {x: 1, y: 0, z: 0}
|
|
||||||
speed: 2
|
|
||||||
maxDistance: 16
|
|
||||||
pingPong: 1
|
|
||||||
moveOnStart: 1
|
|
||||||
--- !u!1001 &1981541173
|
--- !u!1001 &1981541173
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -25462,7 +25127,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 36345656}
|
objectReference: {fileID: 36345656}
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
||||||
propertyPath: m_VersionIndex
|
propertyPath: m_VersionIndex
|
||||||
value: 337
|
value: 331
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
- target: {fileID: 2212457409070270700, guid: 28468bc4d76574c58b20f1a932bdaf62, type: 3}
|
||||||
propertyPath: m_Tangents.Array.size
|
propertyPath: m_Tangents.Array.size
|
||||||
@ -26056,7 +25721,6 @@ GameObject:
|
|||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 2018333464}
|
- component: {fileID: 2018333464}
|
||||||
- component: {fileID: 2018333465}
|
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: UI
|
m_Name: UI
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -26081,22 +25745,6 @@ Transform:
|
|||||||
- {fileID: 1497838090}
|
- {fileID: 1497838090}
|
||||||
m_Father: {fileID: 559238034}
|
m_Father: {fileID: 559238034}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &2018333465
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 2018333463}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: d8d6bcfd7fe44d6c89229eb87c0a3296, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.WindowController
|
|
||||||
subscriptionId: e9b0a5efbf1449f887292c2d59c7919a
|
|
||||||
initialWindows:
|
|
||||||
- {fileID: 1953131096}
|
|
||||||
firstFocusItem: {fileID: 0}
|
|
||||||
--- !u!95 &2042901331 stripped
|
--- !u!95 &2042901331 stripped
|
||||||
Animator:
|
Animator:
|
||||||
m_CorrespondingSourceObject: {fileID: 5866666021909216657, guid: 208cb7d0ce6444ed7b55f4c4b4e632aa, type: 3}
|
m_CorrespondingSourceObject: {fileID: 5866666021909216657, guid: 208cb7d0ce6444ed7b55f4c4b4e632aa, type: 3}
|
||||||
|
|||||||
@ -30,13 +30,13 @@ namespace Intrepid.Core.Camera
|
|||||||
|
|
||||||
protected override void OnBootstrap()
|
protected override void OnBootstrap()
|
||||||
{
|
{
|
||||||
// var stack = CameraSystem.Instance.CurrentCameraStreamStack;
|
var stack = CameraSystem.Instance.CurrentCameraStreamStack;
|
||||||
// if (stack.IsNotNull())
|
if (stack.IsNotNull())
|
||||||
// {
|
{
|
||||||
// var lens = stack.TopCameraStream.VCamera.Lens;
|
var lens = stack.TopCameraStream.VCamera.Lens;
|
||||||
// lens.OrthographicSize = startOrthographicSize;
|
lens.OrthographicSize = startOrthographicSize;
|
||||||
// stack.TopCameraStream.VCamera.Lens = lens;
|
stack.TopCameraStream.VCamera.Lens = lens;
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Subscriptions()
|
protected override void Subscriptions()
|
||||||
|
|||||||
@ -14,58 +14,42 @@ namespace Intrepid.Core.Entities
|
|||||||
[GroupInjections, SerializeField] private Entity entity;
|
[GroupInjections, SerializeField] private Entity entity;
|
||||||
[GroupConfigurations, SerializeField] private LayerMask groundMask;
|
[GroupConfigurations, SerializeField] private LayerMask groundMask;
|
||||||
|
|
||||||
[GroupConfigurations, SerializeField] private bool inheritGroundMotionY;
|
|
||||||
[GroupConfigurations, SerializeField] private bool preserveGroundVelocityWhenUngrounded = true;
|
|
||||||
[GroupConfigurations, SerializeField] private float inheritedGroundVelocityDuration = 0.18f;
|
|
||||||
[GroupConfigurations, SerializeField] private float inheritedGroundVelocityDecay = 30f;
|
|
||||||
[GroupConfigurations, SerializeField] private float groundCheckHeight = 1.0f;
|
[GroupConfigurations, SerializeField] private float groundCheckHeight = 1.0f;
|
||||||
[GroupConfigurations, SerializeField] private float groundCheckDistance = 3.0f;
|
[GroupConfigurations, SerializeField] private float groundCheckDistance = 3.0f;
|
||||||
[GroupConfigurations, SerializeField] private float groundOffset;
|
[GroupConfigurations, SerializeField] private float groundOffset;
|
||||||
[GroupConfigurations, SerializeField] private float maxSlopeAngle = 45f;
|
[GroupConfigurations, SerializeField] private float maxSlopeAngle = 45f;
|
||||||
[GroupConfigurations, SerializeField] private float groundProbeRadiusGrounded = 0.5f;
|
[GroupConfigurations, SerializeField] private float groundProbeRadiusGrounded = 0.5f;
|
||||||
[GroupConfigurations, SerializeField] private float groundProbeRadiusFalling = 0.2f;
|
[GroupConfigurations, SerializeField] private float groundProbeRadiusFalling = 0.2f;
|
||||||
[GroupConfigurations, SerializeField] private float fallingGroundCheckDistance = 150f;
|
[GroupConfigurations, SerializeField] private float fallingGroundCheckDistance = 20f;
|
||||||
[GroupConfigurations, SerializeField] private float minFallHeight = 0.25f;
|
[GroupConfigurations, SerializeField] private float minFallHeight = 0.25f;
|
||||||
[GroupConfigurations, SerializeField] private float fallAcceleration = 35f;
|
[GroupConfigurations, SerializeField] private float fallAcceleration = 35f;
|
||||||
[GroupConfigurations, SerializeField] private float maxFallSpeed = 18f;
|
[GroupConfigurations, SerializeField] private float maxFallSpeed = 18f;
|
||||||
|
|
||||||
|
|
||||||
private Vector3 Origin { get; set; }
|
private Vector3 Origin { get; set; }
|
||||||
private Vector3 End { get; set; }
|
private Vector3 End { get; set; }
|
||||||
private bool HasHit { get; set; }
|
private bool HasHit { get; set; }
|
||||||
private Vector3 _inheritedGroundVelocity;
|
|
||||||
private float _fallVerticalSpeed;
|
private float _fallVerticalSpeed;
|
||||||
private RaycastHit _groundHit;
|
private RaycastHit _groundHit;
|
||||||
private float GroundProbeRadius => IsFalling || IsFallingToAbyss
|
private float GroundProbeRadius => IsFalling || IsFallingToAbyss
|
||||||
? groundProbeRadiusFalling
|
? groundProbeRadiusFalling
|
||||||
: groundProbeRadiusGrounded;
|
: groundProbeRadiusGrounded;
|
||||||
|
|
||||||
public GroundProfiles CurrentGroundProfiles { get; private set; } = GroundProfiles.None;
|
|
||||||
public float MaxSlopeAngle => maxSlopeAngle;
|
public float MaxSlopeAngle => maxSlopeAngle;
|
||||||
[GroupDebug, ShowInInspector, ReadOnly]
|
[GroupDebug, ShowInInspector, ReadOnly] public Vector3 LastSafeGroundPosition { get; private set; }
|
||||||
public Vector3 LastSafeGroundPosition { get; private set; }
|
|
||||||
[GroupDebug, ShowInInspector, ReadOnly]
|
|
||||||
public bool HasStableGroundNormal { get; private set; }
|
public bool HasStableGroundNormal { get; private set; }
|
||||||
[GroupDebug, ShowInInspector, ReadOnly]
|
|
||||||
public Vector3 StableGroundNormal { get; private set; }
|
public Vector3 StableGroundNormal { get; private set; }
|
||||||
[GroupDebug, ShowInInspector, ReadOnly]
|
|
||||||
public bool IsFalling { get; private set; }
|
public bool IsFalling { get; private set; }
|
||||||
[GroupDebug, ShowInInspector, ReadOnly]
|
|
||||||
public bool IsFallingToAbyss { get; private set; }
|
public bool IsFallingToAbyss { get; private set; }
|
||||||
[GroupDebug, ShowInInspector, ReadOnly]
|
|
||||||
public bool IsGrounded { get; private set; }
|
public bool IsGrounded { get; private set; }
|
||||||
[GroupDebug, ShowInInspector, ReadOnly]
|
|
||||||
public Vector3 InheritedGroundVelocity => _inheritedGroundVelocity;
|
|
||||||
[GroupDebug, ShowInInspector, ReadOnly]
|
|
||||||
public float InheritedGroundVelocityTimer { get; private set; }
|
|
||||||
|
|
||||||
public void ResetFallingToAbyss()
|
public void ResetFallingToAbyss()
|
||||||
{
|
{
|
||||||
IsFalling = false;
|
IsFalling = false;
|
||||||
IsFallingToAbyss = false;
|
IsFallingToAbyss = false;
|
||||||
CurrentGroundProfiles = GroundProfiles.None;
|
|
||||||
ClearInheritedGroundVelocity();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Move(
|
public void Move(
|
||||||
Rigidbody body,
|
Rigidbody body,
|
||||||
Vector3 velocity,
|
Vector3 velocity,
|
||||||
@ -76,9 +60,9 @@ namespace Intrepid.Core.Entities
|
|||||||
|
|
||||||
if (IsFallingToAbyss)
|
if (IsFallingToAbyss)
|
||||||
{
|
{
|
||||||
return;
|
return; // there is no movement from here....
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsFalling)
|
if (IsFalling)
|
||||||
{
|
{
|
||||||
var nextFalling = ResolveFallingPosition(current, deltaTime);
|
var nextFalling = ResolveFallingPosition(current, deltaTime);
|
||||||
@ -87,45 +71,39 @@ namespace Intrepid.Core.Entities
|
|||||||
}
|
}
|
||||||
|
|
||||||
var movementVelocity = ResolveMovementVelocity(velocity);
|
var movementVelocity = ResolveMovementVelocity(velocity);
|
||||||
var groundMotionDelta = ResolveGroundMotionDelta(deltaTime);
|
var next = current + movementVelocity * deltaTime;
|
||||||
|
if (TryGetGroundSurfaceAt(next, out _groundHit, out var nextNormal))
|
||||||
var next = current
|
|
||||||
+ groundMotionDelta
|
|
||||||
+ movementVelocity * deltaTime;
|
|
||||||
|
|
||||||
if (TryGetGroundSurfaceAt(next, out _groundHit, out var nextNormal, out var groundProfiles))
|
|
||||||
{
|
{
|
||||||
IsGrounded = true;
|
IsGrounded = true;
|
||||||
IsFallingToAbyss = false;
|
IsFallingToAbyss = false;
|
||||||
|
|
||||||
CurrentGroundProfiles = groundProfiles;
|
|
||||||
|
|
||||||
RegisterStableGroundNormal(nextNormal);
|
RegisterStableGroundNormal(nextNormal);
|
||||||
RefreshInheritedGroundVelocityFrom(groundProfiles);
|
|
||||||
|
|
||||||
next.y = _groundHit.point.y + groundOffset;
|
next.y = _groundHit.point.y + groundOffset;
|
||||||
|
LastSafeGroundPosition = new Vector3(
|
||||||
if (CurrentGroundProfiles.IsSafe)
|
next.x,
|
||||||
|
_groundHit.point.y + groundOffset,
|
||||||
|
next.z
|
||||||
|
);
|
||||||
|
if (IsFalling)
|
||||||
{
|
{
|
||||||
LastSafeGroundPosition = new Vector3(
|
IsFalling = false;
|
||||||
next.x,
|
Proxy.Instance.EventBus.Raise(new EntityRecoverStableGroundEvent
|
||||||
next.y,
|
{
|
||||||
next.z
|
EntityId = entity.Id,
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (options.KeepHeightWhenNoGround)
|
else if (options.KeepHeightWhenNoGround) // that is probable an ability like sentinel dash, or enemy jump...
|
||||||
{
|
{
|
||||||
IsGrounded = false;
|
IsGrounded = false;
|
||||||
IsFalling = false;
|
IsFalling = false;
|
||||||
IsFallingToAbyss = false;
|
IsFallingToAbyss = false;
|
||||||
|
|
||||||
// Important:
|
// Important:
|
||||||
// We are no longer grounded, so the current ground profile must be cleared.
|
// Do not set next.y = current.y here.
|
||||||
// But inherited ground velocity is intentionally preserved for game feel.
|
// The Y value has already been produced by the velocity projected onto the last stable ground normal.
|
||||||
CurrentGroundProfiles = GroundProfiles.None;
|
// While crossing gaps, the entity keeps moving along the last GroundSurface plane.
|
||||||
}
|
}
|
||||||
else if (TryAnyGroundSurfaceBelowAt(next, out var fallHit, out _, out _)
|
else if (TryAnyGroundSurfaceBelowAt(next, out var fallHit, out _)
|
||||||
&& IsGroundMeaningfullyBelow(current, fallHit))
|
&& IsGroundMeaningfullyBelow(current, fallHit))
|
||||||
{
|
{
|
||||||
BeginFall();
|
BeginFall();
|
||||||
@ -139,117 +117,24 @@ namespace Intrepid.Core.Entities
|
|||||||
|
|
||||||
ApplyMove(body, next);
|
ApplyMove(body, next);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Vector3 ResolveGroundMotionDelta(float deltaTime)
|
|
||||||
{
|
|
||||||
if (IsGrounded && CurrentGroundProfiles.TryGetGroundProfileMotion(out var motion))
|
|
||||||
{
|
|
||||||
var delta = motion.DeltaPosition;
|
|
||||||
|
|
||||||
CaptureInheritedGroundVelocity(motion.Velocity);
|
|
||||||
|
|
||||||
if (inheritGroundMotionY)
|
|
||||||
{
|
|
||||||
return delta;
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Vector3(delta.x, 0f, delta.z);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ResolveInheritedGroundMotionDelta(deltaTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Vector3 ResolveInheritedGroundMotionDelta(float deltaTime)
|
|
||||||
{
|
|
||||||
if (!preserveGroundVelocityWhenUngrounded)
|
|
||||||
{
|
|
||||||
return Vector3.zero;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (InheritedGroundVelocityTimer <= 0f
|
|
||||||
|| _inheritedGroundVelocity.sqrMagnitude <= GonConstants.CommonZeroSqrt)
|
|
||||||
{
|
|
||||||
ClearInheritedGroundVelocity();
|
|
||||||
return Vector3.zero;
|
|
||||||
}
|
|
||||||
|
|
||||||
var delta = _inheritedGroundVelocity * deltaTime;
|
|
||||||
|
|
||||||
InheritedGroundVelocityTimer = Mathf.Max(
|
|
||||||
0f,
|
|
||||||
InheritedGroundVelocityTimer - deltaTime
|
|
||||||
);
|
|
||||||
|
|
||||||
_inheritedGroundVelocity = Vector3.MoveTowards(
|
|
||||||
_inheritedGroundVelocity,
|
|
||||||
Vector3.zero,
|
|
||||||
inheritedGroundVelocityDecay * deltaTime
|
|
||||||
);
|
|
||||||
|
|
||||||
if (inheritGroundMotionY)
|
|
||||||
{
|
|
||||||
return delta;
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Vector3(delta.x, 0f, delta.z);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CaptureInheritedGroundVelocity(Vector3 velocity)
|
|
||||||
{
|
|
||||||
if (!preserveGroundVelocityWhenUngrounded)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!inheritGroundMotionY)
|
|
||||||
{
|
|
||||||
velocity.y = 0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
_inheritedGroundVelocity = velocity;
|
|
||||||
InheritedGroundVelocityTimer = inheritedGroundVelocityDuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RefreshInheritedGroundVelocityFrom(GroundProfiles groundProfiles)
|
|
||||||
{
|
|
||||||
if (groundProfiles.TryGetGroundProfileMotion(out var motion))
|
|
||||||
{
|
|
||||||
CaptureInheritedGroundVelocity(motion.Velocity);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ClearInheritedGroundVelocity();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ClearInheritedGroundVelocity()
|
|
||||||
{
|
|
||||||
_inheritedGroundVelocity = Vector3.zero;
|
|
||||||
InheritedGroundVelocityTimer = 0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Vector3 ResolveFallingPosition(Vector3 current, float deltaTime)
|
private Vector3 ResolveFallingPosition(Vector3 current, float deltaTime)
|
||||||
{
|
{
|
||||||
IsGrounded = false;
|
IsGrounded = false;
|
||||||
IsFallingToAbyss = false;
|
IsFallingToAbyss = false;
|
||||||
|
|
||||||
var inheritedMotionDelta = ResolveInheritedGroundMotionDelta(deltaTime);
|
|
||||||
|
|
||||||
_fallVerticalSpeed = Mathf.Min(
|
_fallVerticalSpeed = Mathf.Min(
|
||||||
_fallVerticalSpeed + fallAcceleration * deltaTime,
|
_fallVerticalSpeed + fallAcceleration * deltaTime,
|
||||||
maxFallSpeed
|
maxFallSpeed
|
||||||
);
|
);
|
||||||
|
|
||||||
var next = current + inheritedMotionDelta;
|
var next = current;
|
||||||
next.y -= _fallVerticalSpeed * deltaTime;
|
next.y -= _fallVerticalSpeed * deltaTime;
|
||||||
|
|
||||||
if (!TryAnyGroundSurfaceBelowAt(
|
if (!TryAnyGroundSurfaceBelowAt(next, out var fallHit, out var fallNormal))
|
||||||
next,
|
|
||||||
out var fallHit,
|
|
||||||
out var fallNormal,
|
|
||||||
out var fallProfiles))
|
|
||||||
{
|
{
|
||||||
BeginFallToAbyss();
|
BeginFallToAbyss();
|
||||||
return current;
|
return current; // or next?
|
||||||
}
|
}
|
||||||
|
|
||||||
var targetY = fallHit.point.y + groundOffset;
|
var targetY = fallHit.point.y + groundOffset;
|
||||||
@ -263,23 +148,17 @@ namespace Intrepid.Core.Entities
|
|||||||
|
|
||||||
RegisterStableGroundNormal(fallNormal);
|
RegisterStableGroundNormal(fallNormal);
|
||||||
|
|
||||||
|
// LastSafeGroundPosition = new Vector3(
|
||||||
|
// next.x,
|
||||||
|
// targetY,
|
||||||
|
// next.z
|
||||||
|
// );
|
||||||
|
|
||||||
IsGrounded = true;
|
IsGrounded = true;
|
||||||
IsFalling = false;
|
IsFalling = false;
|
||||||
IsFallingToAbyss = false;
|
IsFallingToAbyss = false;
|
||||||
_fallVerticalSpeed = 0f;
|
_fallVerticalSpeed = 0f;
|
||||||
|
|
||||||
CurrentGroundProfiles = fallProfiles;
|
|
||||||
RefreshInheritedGroundVelocityFrom(fallProfiles);
|
|
||||||
|
|
||||||
if (CurrentGroundProfiles.IsSafe)
|
|
||||||
{
|
|
||||||
LastSafeGroundPosition = new Vector3(
|
|
||||||
next.x,
|
|
||||||
next.y,
|
|
||||||
next.z
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Proxy.Instance.EventBus.Raise(new EntityRecoverStableGroundEvent
|
Proxy.Instance.EventBus.Raise(new EntityRecoverStableGroundEvent
|
||||||
{
|
{
|
||||||
EntityId = entity.Id,
|
EntityId = entity.Id,
|
||||||
@ -287,7 +166,7 @@ namespace Intrepid.Core.Entities
|
|||||||
|
|
||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BeginFall()
|
private void BeginFall()
|
||||||
{
|
{
|
||||||
if (IsFalling)
|
if (IsFalling)
|
||||||
@ -300,10 +179,6 @@ namespace Intrepid.Core.Entities
|
|||||||
IsFallingToAbyss = false;
|
IsFallingToAbyss = false;
|
||||||
_fallVerticalSpeed = 0f;
|
_fallVerticalSpeed = 0f;
|
||||||
|
|
||||||
// We clear the contact, but not the inherited velocity.
|
|
||||||
// This gives a short carry from the moving platform after leaving it.
|
|
||||||
CurrentGroundProfiles = GroundProfiles.None;
|
|
||||||
|
|
||||||
Proxy.Instance.EventBus.Raise(new EntityLeaveStableGroundEvent
|
Proxy.Instance.EventBus.Raise(new EntityLeaveStableGroundEvent
|
||||||
{
|
{
|
||||||
EntityId = entity.Id,
|
EntityId = entity.Id,
|
||||||
@ -316,17 +191,14 @@ namespace Intrepid.Core.Entities
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DLogger.LogDebug("Real abyss fall");
|
DLogger.LogDebug("Real abyss fall");
|
||||||
|
|
||||||
IsGrounded = false;
|
IsGrounded = false;
|
||||||
IsFalling = false;
|
IsFalling = false;
|
||||||
IsFallingToAbyss = true;
|
IsFallingToAbyss = true;
|
||||||
_fallVerticalSpeed = 0f;
|
_fallVerticalSpeed = 0f;
|
||||||
|
|
||||||
CurrentGroundProfiles = GroundProfiles.None;
|
|
||||||
ClearInheritedGroundVelocity();
|
|
||||||
|
|
||||||
Proxy.Instance.EventBus.Raise(new EntityFaillingToAbyssEvent
|
Proxy.Instance.EventBus.Raise(new EntityFaillingToAbyssEvent
|
||||||
{
|
{
|
||||||
EntityId = entity.Id,
|
EntityId = entity.Id,
|
||||||
@ -347,15 +219,12 @@ namespace Intrepid.Core.Entities
|
|||||||
|
|
||||||
public void RefreshStableGroundNormalAt(Vector3 position)
|
public void RefreshStableGroundNormalAt(Vector3 position)
|
||||||
{
|
{
|
||||||
if (!TryGetGroundSurfaceAt(position, out _, out var normal, out var groundProfiles))
|
if (!TryGetGroundSurfaceAt(position, out _, out var normal))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (groundProfiles.IsSafe)
|
RegisterStableGroundNormal(normal);
|
||||||
{
|
|
||||||
RegisterStableGroundNormal(normal);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Vector3 ResolveMovementVelocity(Vector3 velocity)
|
private Vector3 ResolveMovementVelocity(Vector3 velocity)
|
||||||
@ -389,17 +258,15 @@ namespace Intrepid.Core.Entities
|
|||||||
|
|
||||||
public bool HasGroundSurfaceAt(Vector3 position)
|
public bool HasGroundSurfaceAt(Vector3 position)
|
||||||
{
|
{
|
||||||
return TryGetGroundSurfaceAt(position, out _, out _, out _);
|
return TryGetGroundSurfaceAt(position, out _, out _);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool TryGetGroundSurfaceAt(
|
private bool TryGetGroundSurfaceAt(
|
||||||
Vector3 position,
|
Vector3 position,
|
||||||
out RaycastHit hit,
|
out RaycastHit hit,
|
||||||
out Vector3 normal,
|
out Vector3 normal)
|
||||||
out GroundProfiles groundProfiles)
|
|
||||||
{
|
{
|
||||||
normal = default;
|
normal = default;
|
||||||
groundProfiles = GroundProfiles.None;
|
|
||||||
|
|
||||||
if (!TryGetGroundAt(position, out hit))
|
if (!TryGetGroundAt(position, out hit))
|
||||||
{
|
{
|
||||||
@ -420,8 +287,6 @@ namespace Intrepid.Core.Entities
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
groundProfiles = surface.GroundProfiles;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -446,11 +311,9 @@ namespace Intrepid.Core.Entities
|
|||||||
private bool TryAnyGroundSurfaceBelowAt(
|
private bool TryAnyGroundSurfaceBelowAt(
|
||||||
Vector3 position,
|
Vector3 position,
|
||||||
out RaycastHit hit,
|
out RaycastHit hit,
|
||||||
out Vector3 normal,
|
out Vector3 normal)
|
||||||
out GroundProfiles groundProfiles)
|
|
||||||
{
|
{
|
||||||
normal = default;
|
normal = default;
|
||||||
groundProfiles = GroundProfiles.None;
|
|
||||||
|
|
||||||
var origin = position + Vector3.up * groundCheckHeight;
|
var origin = position + Vector3.up * groundCheckHeight;
|
||||||
|
|
||||||
@ -478,14 +341,7 @@ namespace Intrepid.Core.Entities
|
|||||||
|
|
||||||
normal = surface.Normal;
|
normal = surface.Normal;
|
||||||
|
|
||||||
if (!IsWalkable(normal))
|
return IsWalkable(normal);
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
groundProfiles = surface.GroundProfiles;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsWalkable(Vector3 normal)
|
private bool IsWalkable(Vector3 normal)
|
||||||
@ -566,15 +422,6 @@ namespace Intrepid.Core.Entities
|
|||||||
transform.position + StableGroundNormal * 1.25f
|
transform.position + StableGroundNormal * 1.25f
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_inheritedGroundVelocity.sqrMagnitude > GonConstants.CommonZeroSqrt)
|
|
||||||
{
|
|
||||||
Gizmos.color = Color.green;
|
|
||||||
Gizmos.DrawLine(
|
|
||||||
transform.position,
|
|
||||||
transform.position + _inheritedGroundVelocity.normalized * 1.5f
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
using Intrepid.Utilities;
|
|
||||||
|
|
||||||
namespace Intrepid.Core.Grounding
|
|
||||||
{
|
|
||||||
public abstract class GroundProfile : Identification
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: fdc7306926734d3bb5b74cc1107abb58
|
|
||||||
timeCreated: 1781275820
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Intrepid.Core.Grounding
|
|
||||||
{
|
|
||||||
public abstract class GroundProfileMotion : GroundProfile
|
|
||||||
{
|
|
||||||
public abstract Vector3 Velocity { get; protected set; }
|
|
||||||
public abstract Vector3 DeltaPosition { get; protected set; }
|
|
||||||
public abstract bool IsMoving { get; protected set; }
|
|
||||||
public abstract bool IsStatic { get; protected set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: e0bf2067f5ce4269a39772ba51ee47e2
|
|
||||||
timeCreated: 1781275853
|
|
||||||
@ -1,46 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace Intrepid.Core.Grounding
|
|
||||||
{
|
|
||||||
public readonly struct GroundProfiles
|
|
||||||
{
|
|
||||||
public static readonly GroundProfiles None = new(false);
|
|
||||||
|
|
||||||
private readonly bool _isSafe;
|
|
||||||
private GroundProfileMotion GroundProfileMotion { get; }
|
|
||||||
public bool IsSafe => CheckIfThisProfileIsSafe();
|
|
||||||
|
|
||||||
public GroundProfiles(bool isSafe, GroundProfileMotion groundProfileMotion = null)
|
|
||||||
{
|
|
||||||
_isSafe = isSafe;
|
|
||||||
GroundProfileMotion = groundProfileMotion;
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool CheckIfThisProfileIsSafe()
|
|
||||||
{
|
|
||||||
if (GroundProfileMotion.IsNull())
|
|
||||||
{
|
|
||||||
return _isSafe;
|
|
||||||
}
|
|
||||||
|
|
||||||
return GroundProfileMotion.IsStatic;
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool TryGet<T>(T value, out T profile) where T: GroundProfile
|
|
||||||
{
|
|
||||||
if (value.IsNull())
|
|
||||||
{
|
|
||||||
profile = null;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
profile = value;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool TryGetGroundProfileMotion(out GroundProfileMotion profile)
|
|
||||||
{
|
|
||||||
return TryGet(GroundProfileMotion, out profile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 2bcaf8255e9847b8b25727c33769f037
|
|
||||||
timeCreated: 1781276176
|
|
||||||
@ -12,33 +12,21 @@ namespace Intrepid.Core.Grounding
|
|||||||
public class GroundSurface : MonoBehaviour
|
public class GroundSurface : MonoBehaviour
|
||||||
{
|
{
|
||||||
[GroupInjections, SerializeField] private BoxCollider boxCollider;
|
[GroupInjections, SerializeField] private BoxCollider boxCollider;
|
||||||
[GroupConfigurations("Profiles"), SerializeField] private bool safe = true;
|
|
||||||
[GroupConfigurations("Profiles"), SerializeField] private GroundProfileMotion groundProfileMotion;
|
|
||||||
|
|
||||||
|
|
||||||
[GroupDebug, ShowInInspector, ReadOnly] public Vector3 Position { get; private set; }
|
[GroupDebug, ShowInInspector, ReadOnly] public Vector3 Position { get; private set; }
|
||||||
[GroupDebug, ShowInInspector, ReadOnly] public Vector3 Normal { get; private set; }
|
[GroupDebug, ShowInInspector, ReadOnly] public Vector3 Normal { get; private set; }
|
||||||
public GroundProfiles GroundProfiles { get; private set; } = GroundProfiles.None;
|
|
||||||
|
|
||||||
private void OnValidate()
|
private void OnValidate()
|
||||||
{
|
{
|
||||||
if (boxCollider.IsNull()) return;
|
if (boxCollider.IsNull()) return;
|
||||||
DetectPosition();
|
DetectPosition();
|
||||||
DetectNormal();
|
DetectNormal();
|
||||||
RefreshProfiles();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
DetectPosition();
|
DetectPosition();
|
||||||
DetectNormal();
|
DetectNormal();
|
||||||
RefreshProfiles();
|
|
||||||
}
|
|
||||||
|
|
||||||
[GroupDebug, Button(ButtonSizes.Medium)]
|
|
||||||
private void RefreshProfiles()
|
|
||||||
{
|
|
||||||
GroundProfiles = new GroundProfiles(safe, groundProfileMotion);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Button(ButtonSizes.Medium)]
|
[Button(ButtonSizes.Medium)]
|
||||||
|
|||||||
@ -4,7 +4,6 @@ using Intrepid.Core;
|
|||||||
using Intrepid.Core.Camera;
|
using Intrepid.Core.Camera;
|
||||||
using Intrepid.Core.Entities;
|
using Intrepid.Core.Entities;
|
||||||
using Intrepid.Core.Entities.Messages;
|
using Intrepid.Core.Entities.Messages;
|
||||||
using Intrepid.Core.Grounding;
|
|
||||||
using Intrepid.Core.TimeControl;
|
using Intrepid.Core.TimeControl;
|
||||||
using Intrepid.Gameplay.Entities.Player.ActionBelt;
|
using Intrepid.Gameplay.Entities.Player.ActionBelt;
|
||||||
using Intrepid.Gameplay.Entities.Player.Sentinel;
|
using Intrepid.Gameplay.Entities.Player.Sentinel;
|
||||||
@ -74,6 +73,16 @@ namespace Intrepid.Gameplay.Entities.Player.Sentinel
|
|||||||
StateMachine.UpdateStateMachine();
|
StateMachine.UpdateStateMachine();
|
||||||
|
|
||||||
InputResolver.Sentinel.CaptureAndPrune(TimeSimulation.Instance.ScaledElapsedTime);
|
InputResolver.Sentinel.CaptureAndPrune(TimeSimulation.Instance.ScaledElapsedTime);
|
||||||
|
|
||||||
|
// that is the right place?
|
||||||
|
if (Controls.OnCadence)
|
||||||
|
{
|
||||||
|
TimeSimulation.Instance.AsBreathMotion(.5f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TimeSimulation.Instance.AsNormalMotion(.5f);
|
||||||
|
}
|
||||||
|
|
||||||
if (StateFirstFrame)
|
if (StateFirstFrame)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,12 +16,12 @@ namespace Intrepid.Gameplay.Entities.Player.Sentinel
|
|||||||
|
|
||||||
protected override void InitializeVariables()
|
protected override void InitializeVariables()
|
||||||
{
|
{
|
||||||
CameraStreamStack.Transform = Brain.Entity.RigidBodyTransform;
|
|
||||||
CameraStreamStack.Push(follow, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnBootstrap()
|
protected override void OnBootstrap()
|
||||||
{
|
{
|
||||||
|
CameraStreamStack.Transform = Brain.Entity.RigidBodyTransform;
|
||||||
|
CameraStreamStack.Push(follow, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Subscriptions()
|
protected override void Subscriptions()
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using Intrepid.Core.Entities;
|
using Intrepid.Core.Entities;
|
||||||
using Intrepid.Core.Grounding;
|
|
||||||
using Intrepid.GameManagers;
|
using Intrepid.GameManagers;
|
||||||
using Intrepid.Gameplay.Messages.Events;
|
using Intrepid.Gameplay.Messages.Events;
|
||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
@ -31,7 +30,6 @@ namespace Intrepid.Gameplay.Entities.Player.Sentinel
|
|||||||
public Vector3 LinearVelocity { get; private set; }
|
public Vector3 LinearVelocity { get; private set; }
|
||||||
public Vector2 Forward => new Vector2(_desiredForward.x, _desiredForward.z).normalized;
|
public Vector2 Forward => new Vector2(_desiredForward.x, _desiredForward.z).normalized;
|
||||||
public bool IsGrounded => MotorTopDown.IsGrounded;
|
public bool IsGrounded => MotorTopDown.IsGrounded;
|
||||||
public GroundProfiles CurrentGroundProfiles => MotorTopDown.CurrentGroundProfiles;
|
|
||||||
|
|
||||||
public override void DeployEntity(Vector2 position)
|
public override void DeployEntity(Vector2 position)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
using Intrepid.Core.TimeControl;
|
|
||||||
using Intrepid.Structures;
|
using Intrepid.Structures;
|
||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -28,16 +27,11 @@ namespace Intrepid.Gameplay.Entities.Player.Sentinel.StateMachine.States
|
|||||||
protected override void RunOnEnter(ParameterStore parameterStore)
|
protected override void RunOnEnter(ParameterStore parameterStore)
|
||||||
{
|
{
|
||||||
Brain.Entity.ModelAnimation.CrossFade(dashRecovery, 0.05f);
|
Brain.Entity.ModelAnimation.CrossFade(dashRecovery, 0.05f);
|
||||||
if (Brain.Controls.OnCadence)
|
|
||||||
{
|
|
||||||
TimeSimulation.Instance.AsBreathMotion();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void RunOnExit()
|
protected override void RunOnExit()
|
||||||
{
|
{
|
||||||
Timer.Stop();
|
Timer.Stop();
|
||||||
TimeSimulation.Instance.AsNormalMotion();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void RunOnFirstFrameOnly()
|
public override void RunOnFirstFrameOnly()
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
using Intrepid.Diagnostics;
|
|
||||||
using Intrepid.Structures;
|
using Intrepid.Structures;
|
||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -12,7 +11,6 @@ namespace Intrepid.Gameplay.Entities.Player.Sentinel.StateMachine.States
|
|||||||
[GroupConfigurations, SerializeField] private float KnockoutTimeMultiplier = 0.1f;
|
[GroupConfigurations, SerializeField] private float KnockoutTimeMultiplier = 0.1f;
|
||||||
[GroupConfigurations, SerializeField, Range(0, 3)] private float knockdownTime = .1f;
|
[GroupConfigurations, SerializeField, Range(0, 3)] private float knockdownTime = .1f;
|
||||||
[GroupConfigurations, SerializeField, Range(0, 3)] private float recoverTime = .5f;
|
[GroupConfigurations, SerializeField, Range(0, 3)] private float recoverTime = .5f;
|
||||||
[GroupConfigurations, SerializeField] private float maxKnockdown = 15f;
|
|
||||||
|
|
||||||
private Vector2 KnockdownForce { get; set; }
|
private Vector2 KnockdownForce { get; set; }
|
||||||
private float KnockoutTime { get; set; }
|
private float KnockoutTime { get; set; }
|
||||||
@ -35,7 +33,7 @@ namespace Intrepid.Gameplay.Entities.Player.Sentinel.StateMachine.States
|
|||||||
KnockdownForce = ps.Get<Vector2>(SentinelConstants.Parameters.KnockdownForce);
|
KnockdownForce = ps.Get<Vector2>(SentinelConstants.Parameters.KnockdownForce);
|
||||||
Brain.Entity.ChangeOrientation(-KnockdownForce.normalized);
|
Brain.Entity.ChangeOrientation(-KnockdownForce.normalized);
|
||||||
KnockoutTime = KnockdownForce.sqrMagnitude * KnockoutTimeMultiplier;
|
KnockoutTime = KnockdownForce.sqrMagnitude * KnockoutTimeMultiplier;
|
||||||
Brain.Entity.DesiredVelocity = Vector2.ClampMagnitude(KnockdownForce, maxKnockdown);
|
Brain.Entity.DesiredVelocity = KnockdownForce;
|
||||||
KnockdownTimer.Start();
|
KnockdownTimer.Start();
|
||||||
KnockoutTimer.Stop();
|
KnockoutTimer.Stop();
|
||||||
RecoverTimer.Stop();
|
RecoverTimer.Stop();
|
||||||
|
|||||||
@ -38,7 +38,7 @@ namespace Intrepid.Gameplay.Entities.Player.Sentinel.StateMachine.States
|
|||||||
});
|
});
|
||||||
Proxy.Instance.EventBus.Raise(new WindowOpenEvent
|
Proxy.Instance.EventBus.Raise(new WindowOpenEvent
|
||||||
{
|
{
|
||||||
ShouldStack = true,
|
ShouldStack = false,
|
||||||
WindowDataList = new List<WindowData>
|
WindowDataList = new List<WindowData>
|
||||||
{
|
{
|
||||||
pdaWindowData
|
pdaWindowData
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: d317b4205069414bab2594af1367a7cd
|
|
||||||
timeCreated: 1781273885
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 036b53ea50a747568a81067ed062ab63
|
|
||||||
timeCreated: 1781273890
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
namespace Intrepid.Utilities.Structures.Traits
|
|
||||||
{
|
|
||||||
public interface IMutableTraits<in T> where T : ITrait
|
|
||||||
{
|
|
||||||
void Declare<TT>(TT trait) where TT : T;
|
|
||||||
bool Discard<TT>() where TT : T;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 60e2f3c521b5464c99572ec85a79b49c
|
|
||||||
timeCreated: 1781274068
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using Intrepid.Structures;
|
|
||||||
|
|
||||||
namespace Intrepid.Utilities.Structures.Traits
|
|
||||||
{
|
|
||||||
public interface IReadOnlyTraits<T> where T : ITrait
|
|
||||||
{
|
|
||||||
IEnumerable<SKey> TraitKeys { get; }
|
|
||||||
IEnumerable<T> AllTraits { get; }
|
|
||||||
public bool Has<TT>() where TT : T;
|
|
||||||
bool HasNot<TT>() where TT : T;
|
|
||||||
int Count<TT>() where TT : T;
|
|
||||||
int Count();
|
|
||||||
bool TryGet<TT>(out TT trait) where TT : T;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: a6152bfba97d417aa80a378af0f845b6
|
|
||||||
timeCreated: 1755750583
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
using Intrepid.Structures;
|
|
||||||
|
|
||||||
namespace Intrepid.Utilities.Structures.Traits
|
|
||||||
{
|
|
||||||
public interface ITrait
|
|
||||||
{
|
|
||||||
public SKey Key { get; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: df822f6ba3df45d59124ca029e2bfa68
|
|
||||||
timeCreated: 1755154881
|
|
||||||
@ -1,57 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using Intrepid.Structures;
|
|
||||||
|
|
||||||
namespace Intrepid.Utilities.Structures.Traits
|
|
||||||
{
|
|
||||||
public sealed class Traits<T> : IReadOnlyTraits<T>, IMutableTraits<T> where T : ITrait
|
|
||||||
{
|
|
||||||
private Dictionary<string, T> Holder { get; } = new();
|
|
||||||
private static string KeyFor<P>() => typeof(P).AssemblyQualifiedName;
|
|
||||||
|
|
||||||
public IEnumerable<SKey> TraitKeys => Holder.Values.Select(v => v.Key);
|
|
||||||
public IEnumerable<Type> TraitTypes => AllTraits.Select(t => t.GetType());
|
|
||||||
public IEnumerable<T> AllTraits => Holder.Values;
|
|
||||||
public TraitsQuery<T> Querying() => new(this);
|
|
||||||
|
|
||||||
public void Declare<TT>(TT trait) where TT : T
|
|
||||||
{
|
|
||||||
Holder[KeyFor<TT>()] = trait;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Discard<TT>() where TT : T => Holder.Remove(KeyFor<TT>());
|
|
||||||
|
|
||||||
public bool Has<TT>() where TT : T => Holder.ContainsKey(KeyFor<TT>());
|
|
||||||
|
|
||||||
public bool HasNot<TT>() where TT : T => !Has<TT>();
|
|
||||||
|
|
||||||
public int Count<TT>() where TT : T => AllTraits.Count(t => t is TT);
|
|
||||||
|
|
||||||
public int Count() => AllTraits.Count();
|
|
||||||
|
|
||||||
public bool TryGet<TT>(out TT trait) where TT : T
|
|
||||||
{
|
|
||||||
if (Holder.TryGetValue(KeyFor<TT>(), out var t))
|
|
||||||
{
|
|
||||||
trait = (TT)t;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
trait = default;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool TryFindFirst<TT>(out TT tt) where TT : T
|
|
||||||
{
|
|
||||||
if (AllTraits.Any(t => t is TT))
|
|
||||||
{
|
|
||||||
tt = (TT)AllTraits.First(t => t is TT);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
tt = default;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: da823f94589947afa622262ed259dc94
|
|
||||||
timeCreated: 1755154734
|
|
||||||
@ -1,100 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace Intrepid.Utilities.Structures.Traits
|
|
||||||
{
|
|
||||||
public sealed class TraitsQuery<T> where T : ITrait
|
|
||||||
{
|
|
||||||
public IReadOnlyTraits<T> Source { get; }
|
|
||||||
private List<Func<IEnumerable<T>, IEnumerable<T>>> Operations { get; } = new();
|
|
||||||
private Func<T, float> OrderKey { get; set; }
|
|
||||||
private bool OrderDesc { get; set; } = true;
|
|
||||||
private int? _skip;
|
|
||||||
private int? _take;
|
|
||||||
|
|
||||||
public TraitsQuery(IReadOnlyTraits<T> source)
|
|
||||||
{
|
|
||||||
Source = source;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TraitsQuery<T> Has<TT>() where TT : T
|
|
||||||
{
|
|
||||||
Operations.Add(seq => seq.Where(_ => Source.Has<TT>()));
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TraitsQuery<T> Where<TT>(Func<TT, bool> filter = null) where TT : T
|
|
||||||
{
|
|
||||||
filter ??= _ => true;
|
|
||||||
Operations.Add(seq => seq.Where(_ => Source.TryGet<TT>(out var tt) && filter(tt)));
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TraitsQuery<T> OrderBy(Func<T, float> keySelector, bool descending = true)
|
|
||||||
{
|
|
||||||
OrderKey = keySelector;
|
|
||||||
OrderDesc = descending;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TraitsQuery<T> Skip(int count)
|
|
||||||
{
|
|
||||||
if (count < 0)
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
_skip = count;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TraitsQuery<T> Take(int count)
|
|
||||||
{
|
|
||||||
if (count < 0)
|
|
||||||
{
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
_take = count;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IReadOnlyList<T> ToList() => Materialize().ToList();
|
|
||||||
public T FirstOrDefault() => Materialize().FirstOrDefault();
|
|
||||||
public bool Any() => Materialize().Any();
|
|
||||||
|
|
||||||
public bool TryGet<TT>(out TT trait) where TT : T
|
|
||||||
{
|
|
||||||
return Source.TryGet(out trait);
|
|
||||||
}
|
|
||||||
|
|
||||||
private IEnumerable<T> Materialize()
|
|
||||||
{
|
|
||||||
var query = Source.AllTraits;
|
|
||||||
foreach (var operation in Operations)
|
|
||||||
{
|
|
||||||
query = operation(query);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (OrderKey is not null)
|
|
||||||
{
|
|
||||||
query = OrderDesc
|
|
||||||
? query.OrderByDescending(OrderKey)
|
|
||||||
: query.OrderBy(OrderKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_skip is > 0)
|
|
||||||
{
|
|
||||||
query = query.Skip(_skip.Value);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_take is > 0)
|
|
||||||
{
|
|
||||||
query = query.Take(_take.Value);
|
|
||||||
}
|
|
||||||
|
|
||||||
return query;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: e35096794b4c41948c8c03c8009b7322
|
|
||||||
timeCreated: 1755757808
|
|
||||||
3
Assets/Scripts/POC.meta
Normal file
3
Assets/Scripts/POC.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 950aecf629064624ba1c60498dddcb8d
|
||||||
|
timeCreated: 1779168408
|
||||||
Loading…
x
Reference in New Issue
Block a user