adjustments on action belt window when saving game
This commit is contained in:
parent
1bfcc4d2a8
commit
8419962160
@ -251,7 +251,7 @@ MonoBehaviour:
|
||||
id: a2bcfde700d74b6397798ea30791316a
|
||||
actionCategory: 0
|
||||
canBeDropped: 0
|
||||
shouldDropFromBeltWhenActivated: 1
|
||||
shouldDropFromBeltWhenActivated: 0
|
||||
saveStationModelPrototype: {fileID: 3729166946730868368}
|
||||
actionLocalization: {fileID: 11400000, guid: 218e1b6f0cf274c8195e312760cf82b0, type: 2}
|
||||
descriptionLocalization: {fileID: 11400000, guid: 677dd73e7449b408590ce7f89865a8d0, type: 2}
|
||||
|
||||
@ -16,3 +16,5 @@ MonoBehaviour:
|
||||
shouldBeKeptAlwaysEnabled: 0
|
||||
onEntry: {fileID: 11400000, guid: b12d41919e089475da15bef8808f80b8, type: 2}
|
||||
onExit: {fileID: 11400000, guid: 86176d631377e4d5fba70988ef37e9d9, type: 2}
|
||||
onShow: {fileID: 11400000, guid: 5fa9aef3ab3364c00927f003e33f4321, type: 2}
|
||||
onHide: {fileID: 11400000, guid: 99848f21b8e934dc1a0f1f50b435799d, type: 2}
|
||||
|
||||
18
Assets/Resources/Tags/Windows/action-belt.window.hide.asset
Normal file
18
Assets/Resources/Tags/Windows/action-belt.window.hide.asset
Normal file
@ -0,0 +1,18 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6f2337b04d5e44dba892ac6b72ae7e44, type: 3}
|
||||
m_Name: action-belt.window.hide
|
||||
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowAnimationData
|
||||
mode: 3
|
||||
direction: 1
|
||||
soundEffect: {fileID: 0}
|
||||
animationSpeed: 3
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 99848f21b8e934dc1a0f1f50b435799d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
18
Assets/Resources/Tags/Windows/action-belt.window.show.asset
Normal file
18
Assets/Resources/Tags/Windows/action-belt.window.show.asset
Normal file
@ -0,0 +1,18 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6f2337b04d5e44dba892ac6b72ae7e44, type: 3}
|
||||
m_Name: action-belt.window.show
|
||||
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowAnimationData
|
||||
mode: 3
|
||||
direction: 0
|
||||
soundEffect: {fileID: 0}
|
||||
animationSpeed: 3
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5fa9aef3ab3364c00927f003e33f4321
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -59,7 +59,6 @@ namespace Intrepid.Gameplay.Entities.Player.ActionBelt
|
||||
private void WhenActionBeltEnable(ActionBeltEnableEvent e)
|
||||
{
|
||||
IsOperational = true;
|
||||
if (IsEmpty) return;
|
||||
OpenUI();
|
||||
}
|
||||
|
||||
@ -109,6 +108,7 @@ namespace Intrepid.Gameplay.Entities.Player.ActionBelt
|
||||
private void WhenActionBeltTakeAction(ActionBeltTakeActionEvent e)
|
||||
{
|
||||
TakeAction();
|
||||
if (!IsOperational) return;
|
||||
Proxy.Instance.EventBus.Raise(new ActionBeltUITakeActionEvent());
|
||||
}
|
||||
|
||||
@ -134,18 +134,20 @@ namespace Intrepid.Gameplay.Entities.Player.ActionBelt
|
||||
|
||||
private void OpenUI()
|
||||
{
|
||||
if (!IsOperational) return;
|
||||
if (IsEmpty) return;
|
||||
|
||||
Proxy.Instance.EventBus.Raise(new ActionBeltUIOpenEvent
|
||||
{
|
||||
ActionBelt = ActionBelt,
|
||||
// GetFocusActionEnvelope = () => ActionBelt.Focus,
|
||||
// SneakPeekRightActionEnvelope = () => ActionBelt.PeekRight,
|
||||
// SneakPeekLeftActionEnvelope = () => ActionBelt.PeekLeft,
|
||||
// GetSize = () => ActionBelt.Count,
|
||||
});
|
||||
}
|
||||
|
||||
private void CirculateUI()
|
||||
{
|
||||
if (!IsOperational) return;
|
||||
if (IsEmpty) return;
|
||||
|
||||
if (nextRight)
|
||||
{
|
||||
Proxy.Instance.EventBus.Raise(new ActionBeltUIToRightEvent());
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
using Intrepid.SimpleEvents;
|
||||
|
||||
namespace Intrepid.Gameplay.Entities.Player.ActionBelt.Events
|
||||
{
|
||||
public class ActionBeltHideEvent : IEventBase
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d82e173549834f8ebb63570df81ef64f
|
||||
timeCreated: 1782975954
|
||||
@ -0,0 +1,8 @@
|
||||
using Intrepid.SimpleEvents;
|
||||
|
||||
namespace Intrepid.Gameplay.Entities.Player.ActionBelt.Events
|
||||
{
|
||||
public class ActionBeltShowEvent : IEventBase
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d84bdcd9e99048e08e3d3ad428b60fd0
|
||||
timeCreated: 1782975971
|
||||
@ -62,6 +62,9 @@ namespace Intrepid.Gameplay.Entities.Player.ActionBelt.UI
|
||||
|
||||
protected override void Subscriptions()
|
||||
{
|
||||
Subscribe<ActionBeltShowEvent>(_ => ManagedWindow.Show());
|
||||
Subscribe<ActionBeltHideEvent>(_ => ManagedWindow.Hide());
|
||||
|
||||
Subscribe<ActionBeltUIToRightEvent>(WhenActionBeltNextRight);
|
||||
Subscribe<ActionBeltUIToLeftEvent>(WhenActionBeltNextLeft);
|
||||
|
||||
@ -71,6 +74,8 @@ namespace Intrepid.Gameplay.Entities.Player.ActionBelt.UI
|
||||
|
||||
private void WhenActionBeltUIDrop(ActionBeltUIDropEvent e)
|
||||
{
|
||||
if (!actionBeltManager.IsOperational) return;
|
||||
|
||||
center.BlinkBorderDropped();
|
||||
if (local.gameObject.activeSelf) local.BlinkBorderDropped();
|
||||
}
|
||||
@ -89,6 +94,7 @@ namespace Intrepid.Gameplay.Entities.Player.ActionBelt.UI
|
||||
|
||||
private void WhenActionBeltNextRight(ActionBeltUIToRightEvent e)
|
||||
{
|
||||
if (!actionBeltManager.IsOperational) return;
|
||||
if (!IsOptionActive) return;
|
||||
SwitchRight();
|
||||
contentIconAnimation.SpriteAnimation.Reset();
|
||||
@ -97,6 +103,7 @@ namespace Intrepid.Gameplay.Entities.Player.ActionBelt.UI
|
||||
|
||||
private void WhenActionBeltNextLeft(ActionBeltUIToLeftEvent e)
|
||||
{
|
||||
if (!actionBeltManager.IsOperational) return;
|
||||
if (!IsOptionActive) return;
|
||||
SwitchLeft();
|
||||
contentIconAnimation.SpriteAnimation.Reset();
|
||||
@ -105,6 +112,8 @@ namespace Intrepid.Gameplay.Entities.Player.ActionBelt.UI
|
||||
|
||||
private void WhenActionBeltUITakeAction(ActionBeltUITakeActionEvent e)
|
||||
{
|
||||
if (!actionBeltManager.IsOperational) return;
|
||||
|
||||
center.BlinkBorderActionTaken();
|
||||
if (local.gameObject.activeSelf) local.BlinkBorderActionTaken();
|
||||
}
|
||||
@ -129,6 +138,13 @@ namespace Intrepid.Gameplay.Entities.Player.ActionBelt.UI
|
||||
private void Update()
|
||||
{
|
||||
UpdateTheme();
|
||||
|
||||
if (!actionBeltManager.IsOperational)
|
||||
{
|
||||
Proxy.Instance.EventBus.Raise(new ActionBeltUICloseEvent());
|
||||
return;
|
||||
}
|
||||
|
||||
switch (GetNumberOfActionsInBelt())
|
||||
{
|
||||
case 0:
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
using Intrepid.Core;
|
||||
using Intrepid.Diagnostics;
|
||||
using Intrepid.GameManagers;
|
||||
using Intrepid.Gameplay.Entities.Player.ActionBelt.Events;
|
||||
using Intrepid.Integration.Input;
|
||||
using Intrepid.Integration.Persistence.Events;
|
||||
using Intrepid.Structures;
|
||||
@ -22,11 +24,11 @@ namespace Intrepid.Gameplay.Entities.Player.Sentinel.StateMachine.States
|
||||
|
||||
protected override void Subscriptions()
|
||||
{
|
||||
Subscribe<SavingGameDataBeginEvent>(e =>
|
||||
Subscribe<SavingGameDataBeginEvent>(_ =>
|
||||
{
|
||||
DLogger.LogDebug("Saving started");
|
||||
});
|
||||
Subscribe<SavingGameDataEndEvent>(e =>
|
||||
Subscribe<SavingGameDataEndEvent>(_ =>
|
||||
{
|
||||
DLogger.LogDebug("Saving ended");
|
||||
Timer.Start();
|
||||
@ -53,6 +55,7 @@ namespace Intrepid.Gameplay.Entities.Player.Sentinel.StateMachine.States
|
||||
protected override void RunOnExit()
|
||||
{
|
||||
Timer.Stop();
|
||||
Proxy.Instance.EventBus.Raise(new ActionBeltShowEvent());
|
||||
}
|
||||
|
||||
public override void RunOnUpdate()
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using Intrepid.GameManagers;
|
||||
using Intrepid.Gameplay.Entities.Player.ActionBelt;
|
||||
using Intrepid.Gameplay.Entities.Player.ActionBelt.Events;
|
||||
using Intrepid.Gameplay.Entities.Player.Sentinel.Events;
|
||||
using Intrepid.Localization;
|
||||
using Intrepid.Utilities;
|
||||
@ -23,6 +24,7 @@ namespace Intrepid.Gameplay.Prototyping.SaveStations
|
||||
StageTag = saveStationModelPrototype.StageTag,
|
||||
DeploymentPoint = saveStationModelPrototype.DeploymentPoint
|
||||
});
|
||||
Proxy.Instance.EventBus.Raise(new ActionBeltHideEvent());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5,7 +5,7 @@
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {},
|
||||
"hash": "8b705cd47233eb0aaa29b302894b4cf1e256b919"
|
||||
"hash": "6f1ee5036dced65524bd7cc8af9f244d52f15491"
|
||||
},
|
||||
"com.unity.2d.animation": {
|
||||
"version": "13.0.5",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user