created asmdefs and project organization
This commit is contained in:
parent
087fb7e87a
commit
24f1549dbd
@ -52,10 +52,18 @@ PrefabInstance:
|
|||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_TransformParent: {fileID: 0}
|
m_TransformParent: {fileID: 0}
|
||||||
m_Modifications:
|
m_Modifications:
|
||||||
|
- target: {fileID: 1364872794272454516, guid: fe511f674420741d889f065f493d6917, type: 3}
|
||||||
|
propertyPath: m_Size.x
|
||||||
|
value: 2.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 1364872794272454516, guid: fe511f674420741d889f065f493d6917, type: 3}
|
- target: {fileID: 1364872794272454516, guid: fe511f674420741d889f065f493d6917, type: 3}
|
||||||
propertyPath: m_Size.y
|
propertyPath: m_Size.y
|
||||||
value: 1
|
value: 1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1364872794272454516, guid: fe511f674420741d889f065f493d6917, type: 3}
|
||||||
|
propertyPath: m_Size.z
|
||||||
|
value: 2.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 1364872794272454516, guid: fe511f674420741d889f065f493d6917, type: 3}
|
- target: {fileID: 1364872794272454516, guid: fe511f674420741d889f065f493d6917, type: 3}
|
||||||
propertyPath: m_IsTrigger
|
propertyPath: m_IsTrigger
|
||||||
value: 1
|
value: 1
|
||||||
@ -176,11 +184,12 @@ MonoBehaviour:
|
|||||||
sizeX: 2
|
sizeX: 2
|
||||||
sizeY: 1
|
sizeY: 1
|
||||||
sizeZ: 2
|
sizeZ: 2
|
||||||
offset: 0
|
offset: 0.5
|
||||||
x: 2
|
x: 2
|
||||||
y: 1
|
y: 1
|
||||||
z: 2
|
z: 2
|
||||||
contact_offset: 0
|
contact_offset: 0.5
|
||||||
|
stageManager: {fileID: 0}
|
||||||
--- !u!1 &9075994188305260872 stripped
|
--- !u!1 &9075994188305260872 stripped
|
||||||
GameObject:
|
GameObject:
|
||||||
m_CorrespondingSourceObject: {fileID: 7037144193506342921, guid: fe511f674420741d889f065f493d6917, type: 3}
|
m_CorrespondingSourceObject: {fileID: 7037144193506342921, guid: fe511f674420741d889f065f493d6917, type: 3}
|
||||||
@ -243,7 +252,6 @@ MonoBehaviour:
|
|||||||
actionCategory: 0
|
actionCategory: 0
|
||||||
canBeDropped: 0
|
canBeDropped: 0
|
||||||
shouldDropFromBeltWhenActivated: 1
|
shouldDropFromBeltWhenActivated: 1
|
||||||
saveStationProto: {fileID: 3729166946730868368}
|
saveStationModelPrototype: {fileID: 3729166946730868368}
|
||||||
gameDataPersistenceService: {fileID: 11400000, guid: 4715554a8f2cb477bbf691096f0903f9, type: 2}
|
|
||||||
actionLocalization: {fileID: 11400000, guid: 218e1b6f0cf274c8195e312760cf82b0, type: 2}
|
actionLocalization: {fileID: 11400000, guid: 218e1b6f0cf274c8195e312760cf82b0, type: 2}
|
||||||
descriptionLocalization: {fileID: 11400000, guid: 677dd73e7449b408590ce7f89865a8d0, type: 2}
|
descriptionLocalization: {fileID: 11400000, guid: 677dd73e7449b408590ce7f89865a8d0, type: 2}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
20
Assets/Scripts/Editor/Editor.asmdef
Normal file
20
Assets/Scripts/Editor/Editor.asmdef
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"name": "Editor",
|
||||||
|
"rootNamespace": "",
|
||||||
|
"references": [
|
||||||
|
"GUID:fc68fb84cb3c4f229a5b3a1f4a790dc7",
|
||||||
|
"GUID:0679931e16fd44ced9567e90c5750db7",
|
||||||
|
"GUID:fdf14d66093a14360809b75b4caf5293",
|
||||||
|
"GUID:e6bee7290be4e4e0aa31659ba2585e4f",
|
||||||
|
"GUID:7c583d294993e488c8e389641f9d95f9"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
||||||
7
Assets/Scripts/Editor/Editor.asmdef.meta
Normal file
7
Assets/Scripts/Editor/Editor.asmdef.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b7b60ccedef9b4a4c96f7921d43e18fa
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Intrepid.Diagnostics;
|
using Intrepid.Diagnostics;
|
||||||
using Intrepid.Gameplay.Flooring;
|
using Intrepid.Gameplay.Flooring;
|
||||||
using Intrepid.Gameplay.Journey.Stages;
|
using Intrepid.Gameplay.Journey;
|
||||||
using Intrepid.Gameplay.Prototyping;
|
using Intrepid.Gameplay.Prototyping;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|||||||
20
Assets/Scripts/Intrepid/Core/Core.asmdef
Normal file
20
Assets/Scripts/Intrepid/Core/Core.asmdef
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"name": "Core",
|
||||||
|
"rootNamespace": "",
|
||||||
|
"references": [
|
||||||
|
"GUID:4307f53044263cf4b835bd812fc161a4",
|
||||||
|
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||||
|
"GUID:fc68fb84cb3c4f229a5b3a1f4a790dc7",
|
||||||
|
"GUID:0679931e16fd44ced9567e90c5750db7",
|
||||||
|
"GUID:e6bee7290be4e4e0aa31659ba2585e4f"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
||||||
7
Assets/Scripts/Intrepid/Core/Core.asmdef.meta
Normal file
7
Assets/Scripts/Intrepid/Core/Core.asmdef.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: fdf14d66093a14360809b75b4caf5293
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -1,3 +1,3 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: fc25591fe52e495aac7cf356196678e7
|
guid: e52b30f262fe46099e88482d267cb612
|
||||||
timeCreated: 1780997469
|
timeCreated: 1782403455
|
||||||
@ -1,18 +0,0 @@
|
|||||||
using System;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Intrepid.Core.Themes
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public class MechaTheme : AbstractThemeRelated
|
|
||||||
{
|
|
||||||
public MechaTheme(Palettes palettes) : base(palettes)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public Color EnergyFlowIcon => Palettes.Bundle.Contrast.Background;
|
|
||||||
public UIGaugeTheme EnergyGauge => new(Palettes, Palettes.EnergyGaugeColor, Palettes.CounterFillingColor);
|
|
||||||
public UIDialogMinimalTheme ReactorIcon => new(Palettes);
|
|
||||||
public UIPowerDemandedTheme PowerDemanded => new(Palettes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 583e771b9df3493d9495374e25b96038
|
|
||||||
timeCreated: 1746823537
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace Intrepid.Core.Themes
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public class SpacemanTheme : AbstractThemeRelated
|
|
||||||
{
|
|
||||||
public SpacemanTheme(Palettes palettes) : base(palettes)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public UIGaugeTheme O2Gauge => new(Palettes, Palettes.O2GaugeColor, Palettes.CounterFillingColor);
|
|
||||||
public UIGaugeTheme EnergyGauge => new(Palettes, Palettes.EnergyGaugeColor, Palettes.CounterFillingColor);
|
|
||||||
public UIPowerDemandedTheme PowerDemanded => new(Palettes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: f7d6ed8e65ee4686bec3226c2019e494
|
|
||||||
timeCreated: 1746823554
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
using Intrepid.Core.Themes;
|
|
||||||
using Intrepid.Utilities;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
namespace Intrepid.Core.UI.Gauge
|
|
||||||
{
|
|
||||||
public class GeneralGaugeUI : SimpleGaugeUI
|
|
||||||
{
|
|
||||||
[GroupInjections, SerializeField] private Image borderIn;
|
|
||||||
[GroupInjections, SerializeField] private Image borderOut;
|
|
||||||
|
|
||||||
public UIGaugeTheme Theme { get; set; }
|
|
||||||
|
|
||||||
protected override void UpdateComponents()
|
|
||||||
{
|
|
||||||
base.UpdateComponents();
|
|
||||||
Filling.color = Theme?.Filling ?? Color.cyan;
|
|
||||||
CounterFilling.color = Theme?.CounterFilling ?? Color.magenta;
|
|
||||||
borderIn.color = Theme?.BorderIn ?? Color.gray;
|
|
||||||
borderOut.color = Theme?.BorderOut ?? Color.blue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 338da832e6704cbf89b63137de48490c
|
|
||||||
timeCreated: 1746720035
|
|
||||||
@ -1,64 +0,0 @@
|
|||||||
using Intrepid.Core.Themes;
|
|
||||||
using Intrepid.Utilities;
|
|
||||||
using Sirenix.OdinInspector;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
namespace Intrepid.Core.UI.Gauge
|
|
||||||
{
|
|
||||||
public class PowerDemandedUI : MonoBehaviour
|
|
||||||
{
|
|
||||||
[GroupInjections, SerializeField] private Image pen;
|
|
||||||
[GroupInjections, SerializeField] private Image[] marks;
|
|
||||||
[Title("Theme")]
|
|
||||||
[GroupConfigurations, SerializeField, HideLabel, ReadOnly] private UIPowerDemandedTheme theme;
|
|
||||||
[GroupDebug, SerializeField, Range(0, 1)] private float value;
|
|
||||||
|
|
||||||
private RectTransform RectTransform { get; set; }
|
|
||||||
|
|
||||||
public float Value
|
|
||||||
{
|
|
||||||
get => value;
|
|
||||||
set => this.value = value;
|
|
||||||
}
|
|
||||||
public UIPowerDemandedTheme Theme
|
|
||||||
{
|
|
||||||
get => theme;
|
|
||||||
set => theme = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnValidate()
|
|
||||||
{
|
|
||||||
RectTransform = GetComponent<RectTransform>();
|
|
||||||
UpdateComponents(RectTransform);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
OnValidate();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Update()
|
|
||||||
{
|
|
||||||
UpdateComponents(RectTransform);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateComponents(RectTransform rectTransform)
|
|
||||||
{
|
|
||||||
var quarter = rectTransform.rect.width / 4f;
|
|
||||||
pen.rectTransform.localScale = new Vector3(Value, 1, 1);
|
|
||||||
pen.color = Value switch
|
|
||||||
{
|
|
||||||
<= 0.25f => Theme.PenMin,
|
|
||||||
> 0.5f => Theme.PenMax,
|
|
||||||
_ => Color.Lerp(Theme.PenMin, Theme.PenMax, Value * 4f - 1f)
|
|
||||||
};
|
|
||||||
marks[1].rectTransform.localPosition = new Vector3(-quarter, 0, 0);
|
|
||||||
marks[3].rectTransform.localPosition = new Vector3(quarter, 0, 0);
|
|
||||||
foreach (var mark in marks)
|
|
||||||
{
|
|
||||||
mark.color = Theme.Marks;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 80be79055fb242b29960dfec2a6344ba
|
|
||||||
timeCreated: 1746157988
|
|
||||||
@ -1,9 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using Intrepid.Core.Themes;
|
|
||||||
using Intrepid.Core.UI;
|
using Intrepid.Core.UI;
|
||||||
using Intrepid.Core.UI.Dialog;
|
using Intrepid.Core.UI.Dialog;
|
||||||
using Intrepid.GameManagers;
|
using Intrepid.GameManagers;
|
||||||
using Intrepid.Gameplay.Entities.Player.ActionBelt.Events;
|
using Intrepid.Gameplay.Entities.Player.ActionBelt.Events;
|
||||||
|
using Intrepid.Gameplay.Themes;
|
||||||
using Intrepid.SimpleEvents;
|
using Intrepid.SimpleEvents;
|
||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
using Intrepid.Utilities.Sprite;
|
using Intrepid.Utilities.Sprite;
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Intrepid.Core.Themes;
|
|
||||||
using Intrepid.Gameplay.Entities.Player.PDA.Inputs;
|
using Intrepid.Gameplay.Entities.Player.PDA.Inputs;
|
||||||
|
using Intrepid.Gameplay.Themes;
|
||||||
using Intrepid.Sound;
|
using Intrepid.Sound;
|
||||||
using Intrepid.Structures;
|
using Intrepid.Structures;
|
||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using Intrepid.Core.Themes;
|
|
||||||
using Intrepid.GameManagers;
|
using Intrepid.GameManagers;
|
||||||
using Intrepid.Gameplay.Entities.Player.PDA.Events;
|
using Intrepid.Gameplay.Entities.Player.PDA.Events;
|
||||||
using Intrepid.Gameplay.Entities.Player.PDA.Inputs;
|
using Intrepid.Gameplay.Entities.Player.PDA.Inputs;
|
||||||
|
using Intrepid.Gameplay.Themes;
|
||||||
using Intrepid.Structures;
|
using Intrepid.Structures;
|
||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using Intrepid.Core.Themes;
|
|
||||||
using Intrepid.Core.UI;
|
using Intrepid.Core.UI;
|
||||||
using Intrepid.Core.UI.Dialog;
|
using Intrepid.Core.UI.Dialog;
|
||||||
using Intrepid.GameManagers;
|
using Intrepid.GameManagers;
|
||||||
|
using Intrepid.Gameplay.Themes;
|
||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Intrepid.Core.Themes;
|
using Intrepid.Gameplay.Themes;
|
||||||
using Intrepid.Structures;
|
using Intrepid.Structures;
|
||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|||||||
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 04273749505b4bd6af3db138f7e023e5
|
||||||
|
timeCreated: 1782402429
|
||||||
@ -1,7 +1,7 @@
|
|||||||
using Intrepid.SimpleEvents;
|
using Intrepid.SimpleEvents;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Intrepid.Gameplay.Messages.Events
|
namespace Intrepid.Gameplay.Entities.Player.Sentinel.Events
|
||||||
{
|
{
|
||||||
public class ForceBackOnImpactEvent : IEventBase
|
public class ForceBackOnImpactEvent : IEventBase
|
||||||
{
|
{
|
||||||
@ -10,6 +10,7 @@ using Intrepid.Gameplay.Entities.Player.Sentinel.Cadence;
|
|||||||
using Intrepid.Gameplay.Entities.Player.Sentinel.StateMachine;
|
using Intrepid.Gameplay.Entities.Player.Sentinel.StateMachine;
|
||||||
using Intrepid.Gameplay.Flooring.Events;
|
using Intrepid.Gameplay.Flooring.Events;
|
||||||
using Intrepid.Gameplay.Journey.Messages.Events;
|
using Intrepid.Gameplay.Journey.Messages.Events;
|
||||||
|
using Intrepid.Gameplay.Messages.Events;
|
||||||
using Intrepid.Structures;
|
using Intrepid.Structures;
|
||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -85,6 +86,10 @@ namespace Intrepid.Gameplay.Entities.Player.Sentinel
|
|||||||
});
|
});
|
||||||
ChangeState(SentinelStateType.Idle);
|
ChangeState(SentinelStateType.Idle);
|
||||||
});
|
});
|
||||||
|
Subscribe<SaveStationActionExecutedEvent>(e =>
|
||||||
|
{
|
||||||
|
ChangeState(SentinelStateType.SavingStation, ("SaveStationActionExecutedEvent", e));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void UpdateFromUpdatable()
|
public override void UpdateFromUpdatable()
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
using Intrepid.Core.Entities;
|
using Intrepid.Core.Entities;
|
||||||
using Intrepid.Core.Grounding;
|
using Intrepid.Core.Grounding;
|
||||||
using Intrepid.GameManagers;
|
using Intrepid.GameManagers;
|
||||||
|
using Intrepid.Gameplay.Entities.Player.Sentinel.Events;
|
||||||
using Intrepid.Gameplay.Flooring;
|
using Intrepid.Gameplay.Flooring;
|
||||||
using Intrepid.Gameplay.Messages.Events;
|
using Intrepid.Gameplay.Messages.Events;
|
||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
@ -37,10 +38,15 @@ namespace Intrepid.Gameplay.Entities.Player.Sentinel
|
|||||||
public bool IsGrounded => MotorTopDown.IsGrounded;
|
public bool IsGrounded => MotorTopDown.IsGrounded;
|
||||||
public GroundProfiles CurrentGroundProfiles => MotorTopDown.CurrentGroundProfiles;
|
public GroundProfiles CurrentGroundProfiles => MotorTopDown.CurrentGroundProfiles;
|
||||||
public FloorDetection FloorDetection => floorDetection;
|
public FloorDetection FloorDetection => floorDetection;
|
||||||
|
public Vector3 Position
|
||||||
|
{
|
||||||
|
get => UnityRigidbody.position;
|
||||||
|
set => UnityRigidbody.position = value;
|
||||||
|
}
|
||||||
|
|
||||||
public override void DeployEntity(Vector3 position, Vector2 direction)
|
public override void DeployEntity(Vector3 position, Vector2 direction)
|
||||||
{
|
{
|
||||||
UnityRigidbody.position = position;
|
Position = position;
|
||||||
ChangeOrientation(direction);
|
ChangeOrientation(direction);
|
||||||
|
|
||||||
UnityRigidbody.isKinematic = false;
|
UnityRigidbody.isKinematic = false;
|
||||||
|
|||||||
@ -5,6 +5,7 @@ namespace Intrepid.Gameplay.Entities.Player.Sentinel
|
|||||||
Nop = 0,
|
Nop = 0,
|
||||||
|
|
||||||
PDA = 1,
|
PDA = 1,
|
||||||
|
SavingStation = 2,
|
||||||
|
|
||||||
Idle = 10,
|
Idle = 10,
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
using Intrepid.Gameplay.Entities.Player.Sentinel.Events;
|
||||||
using Intrepid.Gameplay.Messages.Events;
|
using Intrepid.Gameplay.Messages.Events;
|
||||||
using Intrepid.Structures;
|
using Intrepid.Structures;
|
||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
|
|||||||
@ -0,0 +1,84 @@
|
|||||||
|
using Intrepid.Diagnostics;
|
||||||
|
using Intrepid.GameManagers;
|
||||||
|
using Intrepid.Gameplay.Messages.Events;
|
||||||
|
using Intrepid.Integration.Input;
|
||||||
|
using Intrepid.Integration.Persistence;
|
||||||
|
using Intrepid.Integration.Persistence.DTOs;
|
||||||
|
using Intrepid.Integration.Persistence.Events;
|
||||||
|
using Intrepid.SaveSystem;
|
||||||
|
using Intrepid.Structures;
|
||||||
|
using Intrepid.Utilities;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Intrepid.Gameplay.Entities.Player.Sentinel.StateMachine.States
|
||||||
|
{
|
||||||
|
public class SentinelStateSavingStation : SentinelState
|
||||||
|
{
|
||||||
|
[GroupInjections, SerializeField] private GameDataPersistenceService gameDataPersistenceService;
|
||||||
|
[GroupInjections, SerializeField] private AnimationClip savingStation;
|
||||||
|
[GroupInjections, SerializeField, Range(0, 3)] private float minSavingStationDuration = 1f;
|
||||||
|
|
||||||
|
private Timer Timer { get; } = new();
|
||||||
|
|
||||||
|
public override SentinelStateType GetStateKey()
|
||||||
|
{
|
||||||
|
return SentinelStateType.SavingStation;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Subscriptions()
|
||||||
|
{
|
||||||
|
Subscribe<SavingGameDataBeginEvent>(e =>
|
||||||
|
{
|
||||||
|
DLogger.LogDebug($"Saving started");
|
||||||
|
});
|
||||||
|
Subscribe<SavingGameDataEndEvent>(e =>
|
||||||
|
{
|
||||||
|
DLogger.LogDebug($"Saving ended");
|
||||||
|
Timer.Start();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void RunOnFirstFrameOnly()
|
||||||
|
{
|
||||||
|
InputService.Instance.ChangeInputSchema(InputSchema.None);
|
||||||
|
base.RunOnFirstFrameOnly();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void RunOnEnter(ParameterStore ps)
|
||||||
|
{
|
||||||
|
var e = ps.Get<SaveStationActionExecutedEvent>("SaveStationActionExecutedEvent");
|
||||||
|
Brain.Entity.DesiredVelocity = Vector2.zero;
|
||||||
|
Brain.Entity.Position = e.DeploymentPoint;
|
||||||
|
Brain.Entity.ChangeOrientation(Vector2.down);
|
||||||
|
Brain.Entity.ModelAnimation.Play(savingStation);
|
||||||
|
Timer.Stop();
|
||||||
|
gameDataPersistenceService.SaveCurrentGameData(new SavingCallbacksAggregator<GameDataSaveFileDTO>(
|
||||||
|
gameData =>
|
||||||
|
{
|
||||||
|
gameData.data.SentinelData.LatestSaveStation = new SaveStationDTO
|
||||||
|
{
|
||||||
|
StageId = e.StageTag.StageId,
|
||||||
|
DeploymentPosition = e.DeploymentPoint.ToVector3DTO(),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
_ => { }));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void RunOnExit()
|
||||||
|
{
|
||||||
|
Timer.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void RunOnUpdate()
|
||||||
|
{
|
||||||
|
if (Timer.IsNotRunning) return;
|
||||||
|
Timer.Update(Timer.ScaledTime);
|
||||||
|
if (Timer.Check(minSavingStationDuration))
|
||||||
|
{
|
||||||
|
Timer.Stop();
|
||||||
|
InputService.Instance.ChangeInputSchema(InputSchema.Sentinel);
|
||||||
|
Brain.ChangeState(SentinelStateType.Idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4ffc6a9df52e4288a5a0f22ac2d34417
|
||||||
|
timeCreated: 1782397793
|
||||||
21
Assets/Scripts/Intrepid/Gameplay/Gameplay.asmdef
Normal file
21
Assets/Scripts/Intrepid/Gameplay/Gameplay.asmdef
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"name": "Gameplay",
|
||||||
|
"rootNamespace": "",
|
||||||
|
"references": [
|
||||||
|
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||||
|
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||||
|
"GUID:fc68fb84cb3c4f229a5b3a1f4a790dc7",
|
||||||
|
"GUID:0679931e16fd44ced9567e90c5750db7",
|
||||||
|
"GUID:fdf14d66093a14360809b75b4caf5293",
|
||||||
|
"GUID:e6bee7290be4e4e0aa31659ba2585e4f"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
||||||
7
Assets/Scripts/Intrepid/Gameplay/Gameplay.asmdef.meta
Normal file
7
Assets/Scripts/Intrepid/Gameplay/Gameplay.asmdef.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7c583d294993e488c8e389641f9d95f9
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -8,11 +8,12 @@ using Intrepid.Utilities;
|
|||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Intrepid.Gameplay.Journey.Stages
|
namespace Intrepid.Gameplay.Journey
|
||||||
{
|
{
|
||||||
public class StageManager : EventListener
|
public class StageManager : EventListener
|
||||||
{
|
{
|
||||||
[GroupConfigurations, SerializeField] private StageTag stageTag;
|
[GroupConfigurations, SerializeField] private StageTag stageTag;
|
||||||
|
[GroupDebug, SerializeField, ReadOnly] private List<InteractableSaveStationModelPrototype> saveStations;
|
||||||
[GroupDebug, SerializeField, ReadOnly] private List<InteractableSocketModelPrototype> sockets;
|
[GroupDebug, SerializeField, ReadOnly] private List<InteractableSocketModelPrototype> sockets;
|
||||||
|
|
||||||
private Dictionary<string, InteractableSocketModelPrototype> SocketMap { get; } = new();
|
private Dictionary<string, InteractableSocketModelPrototype> SocketMap { get; } = new();
|
||||||
@ -22,7 +23,7 @@ namespace Intrepid.Gameplay.Journey.Stages
|
|||||||
get => stageTag;
|
get => stageTag;
|
||||||
set => stageTag = value;
|
set => stageTag = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void InitializeVariables()
|
protected override void InitializeVariables()
|
||||||
{
|
{
|
||||||
Refresh();
|
Refresh();
|
||||||
@ -54,12 +55,23 @@ namespace Intrepid.Gameplay.Journey.Stages
|
|||||||
private void Refresh()
|
private void Refresh()
|
||||||
{
|
{
|
||||||
sockets.Clear();
|
sockets.Clear();
|
||||||
|
saveStations.Clear();
|
||||||
|
|
||||||
SocketMap.Clear();
|
SocketMap.Clear();
|
||||||
foreach (var stageSocket in GetComponentsInChildren<InteractableSocketModelPrototype>())
|
|
||||||
|
foreach (var interactable in GetComponentsInChildren<InteractableModelPrototype>())
|
||||||
{
|
{
|
||||||
stageSocket.SetStageManager(this);
|
interactable.SetStageManager(this);
|
||||||
sockets.Add(stageSocket);
|
switch (interactable)
|
||||||
SocketMap.Add(stageSocket.EndpointId, stageSocket);
|
{
|
||||||
|
case InteractableSocketModelPrototype socket:
|
||||||
|
sockets.Add(socket);
|
||||||
|
SocketMap.Add(socket.EndpointId, socket);
|
||||||
|
break;
|
||||||
|
case InteractableSaveStationModelPrototype saveStation:
|
||||||
|
saveStations.Add(saveStation);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 1f530d09e5cb49ceb525a4ea0b540014
|
|
||||||
timeCreated: 1782147645
|
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
using Intrepid.Gameplay.Journey;
|
||||||
|
using Intrepid.SimpleEvents;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Intrepid.Gameplay.Messages.Events
|
||||||
|
{
|
||||||
|
public class SaveStationActionExecutedEvent : IEventBase
|
||||||
|
{
|
||||||
|
public StageTag StageTag { get; set; }
|
||||||
|
public Vector3 DeploymentPoint { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 10bb1766c6a844f7aeb220d4a1e6adaf
|
||||||
|
timeCreated: 1782397614
|
||||||
@ -1,8 +1,9 @@
|
|||||||
using UnityEngine;
|
using Intrepid.Gameplay.Journey;
|
||||||
|
|
||||||
namespace Intrepid.Gameplay.Prototyping
|
namespace Intrepid.Gameplay.Prototyping
|
||||||
{
|
{
|
||||||
public abstract class InteractableModelPrototype : ModelPrototype
|
public abstract class InteractableModelPrototype : ModelPrototype
|
||||||
{
|
{
|
||||||
|
public abstract void SetStageManager(StageManager stageManager);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Intrepid.Gameplay.Journey;
|
||||||
using Intrepid.Gameplay.Prototyping.SaveStations;
|
using Intrepid.Gameplay.Prototyping.SaveStations;
|
||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
@ -18,8 +19,15 @@ namespace Intrepid.Gameplay.Prototyping
|
|||||||
[GroupDebug, SerializeField, Min(1)] private int y = 1;
|
[GroupDebug, SerializeField, Min(1)] private int y = 1;
|
||||||
[GroupDebug, SerializeField, Min(1)] private int z = 1;
|
[GroupDebug, SerializeField, Min(1)] private int z = 1;
|
||||||
[GroupDebug, SerializeField, Range(0f, 1f)] private float contact_offset = 1f;
|
[GroupDebug, SerializeField, Range(0f, 1f)] private float contact_offset = 1f;
|
||||||
|
[GroupDebug, SerializeField, ReadOnly] private StageManager stageManager;
|
||||||
|
|
||||||
public Vector3 DeploymentPoint => saveStationDeploymentPoint.DeploymentPoint;
|
public Vector3 DeploymentPoint => saveStationDeploymentPoint.DeploymentPoint;
|
||||||
|
public StageTag StageTag => stageManager?.StageTag;
|
||||||
|
|
||||||
|
public override void SetStageManager(StageManager sm)
|
||||||
|
{
|
||||||
|
stageManager = sm;
|
||||||
|
}
|
||||||
|
|
||||||
protected override void ConfigElements()
|
protected override void ConfigElements()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Intrepid.Gameplay.Journey;
|
using Intrepid.Gameplay.Journey;
|
||||||
using Intrepid.Gameplay.Journey.Stages;
|
|
||||||
using Intrepid.Gameplay.Prototyping.Sockets;
|
using Intrepid.Gameplay.Prototyping.Sockets;
|
||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
@ -31,7 +30,7 @@ namespace Intrepid.Gameplay.Prototyping
|
|||||||
public Vector3 DeploymentPoint => deploymentPoint.DeploymentPoint;
|
public Vector3 DeploymentPoint => deploymentPoint.DeploymentPoint;
|
||||||
public Vector2 DeploymentDirection => deploymentPoint.DeploymentDirection;
|
public Vector2 DeploymentDirection => deploymentPoint.DeploymentDirection;
|
||||||
|
|
||||||
public void SetStageManager(StageManager sm)
|
public override void SetStageManager(StageManager sm)
|
||||||
{
|
{
|
||||||
stageManager = sm;
|
stageManager = sm;
|
||||||
var stageTag = sm.StageTag;
|
var stageTag = sm.StageTag;
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
using Intrepid.Diagnostics;
|
using Intrepid.GameManagers;
|
||||||
using Intrepid.Gameplay.Entities.Player.ActionBelt;
|
using Intrepid.Gameplay.Entities.Player.ActionBelt;
|
||||||
using Intrepid.Integration.Persistence;
|
using Intrepid.Gameplay.Messages.Events;
|
||||||
using Intrepid.Integration.Persistence.DTOs;
|
|
||||||
using Intrepid.Localization;
|
using Intrepid.Localization;
|
||||||
using Intrepid.SaveSystem;
|
|
||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@ -11,8 +9,7 @@ namespace Intrepid.Gameplay.Prototyping.SaveStations
|
|||||||
{
|
{
|
||||||
public class SaveStageActionCallable : ActionCallable
|
public class SaveStageActionCallable : ActionCallable
|
||||||
{
|
{
|
||||||
[GroupInjections, SerializeField] private InteractableSaveStationModelPrototype saveStationProto;
|
[GroupInjections, SerializeField] private InteractableSaveStationModelPrototype saveStationModelPrototype;
|
||||||
[GroupInjections, SerializeField] private GameDataPersistenceService gameDataPersistenceService;
|
|
||||||
[GroupConfigurations, SerializeField] private LocalizationTag actionLocalization;
|
[GroupConfigurations, SerializeField] private LocalizationTag actionLocalization;
|
||||||
[GroupConfigurations, SerializeField] private LocalizationTag descriptionLocalization;
|
[GroupConfigurations, SerializeField] private LocalizationTag descriptionLocalization;
|
||||||
|
|
||||||
@ -21,12 +18,11 @@ namespace Intrepid.Gameplay.Prototyping.SaveStations
|
|||||||
|
|
||||||
protected override void Execute(ActionIdentifier identifier)
|
protected override void Execute(ActionIdentifier identifier)
|
||||||
{
|
{
|
||||||
gameDataPersistenceService.SaveCurrentGameData(new SavingCallbacksAggregator<GameDataSaveFileDTO>(
|
Proxy.Instance.EventBus.Raise(new SaveStationActionExecutedEvent
|
||||||
_ =>
|
{
|
||||||
{
|
StageTag = saveStationModelPrototype.StageTag,
|
||||||
DLogger.LogDebug($"Save station: {identifier}, executing save on: {saveStationProto.DeploymentPoint}");
|
DeploymentPoint = saveStationModelPrototype.DeploymentPoint
|
||||||
},
|
});
|
||||||
_ => { }));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
3
Assets/Scripts/Intrepid/Gameplay/Themes.meta
Normal file
3
Assets/Scripts/Intrepid/Gameplay/Themes.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: fc25591fe52e495aac7cf356196678e7
|
||||||
|
timeCreated: 1780997469
|
||||||
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Intrepid.Core.Themes;
|
||||||
|
|
||||||
namespace Intrepid.Core.Themes
|
namespace Intrepid.Gameplay.Themes
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class DiegeticThemes : AbstractThemeRelated
|
public class DiegeticThemes : AbstractThemeRelated
|
||||||
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Intrepid.Core.Themes;
|
||||||
|
|
||||||
namespace Intrepid.Core.Themes
|
namespace Intrepid.Gameplay.Themes
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class PDAThemes : AbstractThemeRelated
|
public class PDAThemes : AbstractThemeRelated
|
||||||
@ -1,7 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Intrepid.Core.Themes;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Intrepid.Core.Themes
|
namespace Intrepid.Gameplay.Themes
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class SignalTheme : AbstractThemeRelated
|
public class SignalTheme : AbstractThemeRelated
|
||||||
@ -1,13 +1,14 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Intrepid.Core.Themes;
|
||||||
using Intrepid.Localization;
|
using Intrepid.Localization;
|
||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Intrepid.Core.Themes
|
namespace Intrepid.Gameplay.Themes
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
[CreateAssetMenu(fileName = "Theme", menuName = "Intrepid/Theme/Theme Collection")]
|
[CreateAssetMenu(fileName = "Theme", menuName = "GON/Theme/Theme Collection")]
|
||||||
public class Theme : SOIdentification
|
public class Theme : SOIdentification
|
||||||
{
|
{
|
||||||
[GroupConfigurations, SerializeField] private LocalizationTag localizationName;
|
[GroupConfigurations, SerializeField] private LocalizationTag localizationName;
|
||||||
@ -30,7 +31,5 @@ namespace Intrepid.Core.Themes
|
|||||||
public UIActionBeltTheme ActionBeltTheme => new(Palettes, actionBeltAlpha);
|
public UIActionBeltTheme ActionBeltTheme => new(Palettes, actionBeltAlpha);
|
||||||
public DiegeticThemes DiegeticThemes => new(Palettes);
|
public DiegeticThemes DiegeticThemes => new(Palettes);
|
||||||
public PDAThemes PDAThemes => new(Palettes);
|
public PDAThemes PDAThemes => new(Palettes);
|
||||||
public MechaTheme MechaTheme => new(Palettes);
|
|
||||||
public SpacemanTheme SpacemanTheme => new(Palettes);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2,7 +2,7 @@ using System;
|
|||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Intrepid.Core.Themes
|
namespace Intrepid.Gameplay.Themes
|
||||||
{
|
{
|
||||||
[DefaultExecutionOrder(GonConstants.ExecutionOrder.ASAP)]
|
[DefaultExecutionOrder(GonConstants.ExecutionOrder.ASAP)]
|
||||||
public class ThemeManager : SingletonMonoBehaviour<ThemeManager>
|
public class ThemeManager : SingletonMonoBehaviour<ThemeManager>
|
||||||
@ -1,7 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Intrepid.Core.Themes;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Intrepid.Core.Themes
|
namespace Intrepid.Gameplay.Themes
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class UIActionBeltTheme : AbstractThemeRelated
|
public class UIActionBeltTheme : AbstractThemeRelated
|
||||||
@ -1,7 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Intrepid.Core.Themes;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Intrepid.Core.Themes
|
namespace Intrepid.Gameplay.Themes
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class UIGaugeTheme : AbstractThemeRelated
|
public class UIGaugeTheme : AbstractThemeRelated
|
||||||
@ -1,7 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Intrepid.Core.Themes;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Intrepid.Core.Themes
|
namespace Intrepid.Gameplay.Themes
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class UIIconTheme : AbstractThemeRelated
|
public class UIIconTheme : AbstractThemeRelated
|
||||||
@ -1,7 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Intrepid.Core.Themes;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Intrepid.Core.Themes
|
namespace Intrepid.Gameplay.Themes
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class UIPowerDemandedTheme : AbstractThemeRelated
|
public class UIPowerDemandedTheme : AbstractThemeRelated
|
||||||
@ -1,5 +1,4 @@
|
|||||||
using Intrepid.Diagnostics;
|
using Intrepid.Diagnostics;
|
||||||
using Intrepid.Gameplay.Entities.Player.Sentinel.Inputs;
|
|
||||||
using Intrepid.Utilities;
|
using Intrepid.Utilities;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.InputSystem;
|
using UnityEngine.InputSystem;
|
||||||
|
|||||||
18
Assets/Scripts/Intrepid/Integration/Integration.asmdef
Normal file
18
Assets/Scripts/Intrepid/Integration/Integration.asmdef
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"name": "Integration",
|
||||||
|
"rootNamespace": "",
|
||||||
|
"references": [
|
||||||
|
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||||
|
"GUID:fc68fb84cb3c4f229a5b3a1f4a790dc7",
|
||||||
|
"GUID:0679931e16fd44ced9567e90c5750db7"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e6bee7290be4e4e0aa31659ba2585e4f
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -5,13 +5,15 @@ namespace Intrepid.Integration.Persistence.DTOs
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
public class GameDataDTO
|
public class GameDataDTO
|
||||||
{
|
{
|
||||||
public string seed;
|
public string Seed;
|
||||||
|
public SentinelDataDTO SentinelData;
|
||||||
|
|
||||||
public static GameDataDTO WithInitialValues()
|
public static GameDataDTO WithInitialValues()
|
||||||
{
|
{
|
||||||
return new GameDataDTO
|
return new GameDataDTO
|
||||||
{
|
{
|
||||||
seed = Guid.NewGuid().ToString("N")
|
Seed = Guid.NewGuid().ToString("N"),
|
||||||
|
SentinelData = SentinelDataDTO.WithInitialValues(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,27 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Intrepid.Integration.Persistence.DTOs
|
||||||
|
{
|
||||||
|
public static class MappingExtensions
|
||||||
|
{
|
||||||
|
public static Vector3DTO ToVector3DTO(this Vector3 vector3)
|
||||||
|
{
|
||||||
|
return new Vector3DTO
|
||||||
|
{
|
||||||
|
X = vector3.x,
|
||||||
|
Y = vector3.y,
|
||||||
|
Z = vector3.z,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Vector3 ToVector3(this Vector3DTO vector3DTO)
|
||||||
|
{
|
||||||
|
return new Vector3
|
||||||
|
{
|
||||||
|
x = vector3DTO.X,
|
||||||
|
y = vector3DTO.Y,
|
||||||
|
z = vector3DTO.Z,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4df2772c805448e3887df8b70fc14d82
|
||||||
|
timeCreated: 1782400976
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Intrepid.Integration.Persistence.DTOs
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
public class SaveStationDTO
|
||||||
|
{
|
||||||
|
public string StageId;
|
||||||
|
public Vector3DTO DeploymentPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class SentinelDataDTO
|
||||||
|
{
|
||||||
|
public SaveStationDTO LatestSaveStation;
|
||||||
|
|
||||||
|
public static SentinelDataDTO WithInitialValues()
|
||||||
|
{
|
||||||
|
return new SentinelDataDTO
|
||||||
|
{
|
||||||
|
LatestSaveStation = null,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 99682ac2085c4792ae21106fbf4edc98
|
||||||
|
timeCreated: 1782400569
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Intrepid.Integration.Persistence.DTOs
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
public class Vector3DTO
|
||||||
|
{
|
||||||
|
public float X;
|
||||||
|
public float Y;
|
||||||
|
public float Z;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7e25ad01b2c74ebab778ec8989c9692d
|
||||||
|
timeCreated: 1782400520
|
||||||
3
Assets/Scripts/Intrepid/Intrepid.asmdef
Normal file
3
Assets/Scripts/Intrepid/Intrepid.asmdef
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"name": "Intrepid"
|
||||||
|
}
|
||||||
7
Assets/Scripts/Intrepid/Intrepid.asmdef.meta
Normal file
7
Assets/Scripts/Intrepid/Intrepid.asmdef.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e55d743ec28c44be2b1854cb65870eaf
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
16
Assets/Scripts/Intrepid/Utilities/Utilities.asmdef
Normal file
16
Assets/Scripts/Intrepid/Utilities/Utilities.asmdef
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Utilities",
|
||||||
|
"rootNamespace": "",
|
||||||
|
"references": [
|
||||||
|
"GUID:fc68fb84cb3c4f229a5b3a1f4a790dc7"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
||||||
7
Assets/Scripts/Intrepid/Utilities/Utilities.asmdef.meta
Normal file
7
Assets/Scripts/Intrepid/Utilities/Utilities.asmdef.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0679931e16fd44ced9567e90c5750db7
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Loading…
x
Reference in New Issue
Block a user