HoloCop in progress
This commit is contained in:
1 parent
2697212f05
commit
430b250075
79 files changed
+120745
-45077
No files matched your search
@@ -1,4 +1,6 @@
|
||||
using System.Threading;
|
||||
using Code.Game.OfficeGame.BattleMode;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.OfficeGame.BattleMode.UI;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Reflex.Attributes;
|
||||
@@ -9,6 +11,7 @@ namespace Code.OfficeGame.BattleMode.Actions.Player
|
||||
public class PlayerControlledTimelineActor : EntityTimelineActor
|
||||
{
|
||||
[Inject] private BattleActionDecisionPanel _battleActionDecisionPanel;
|
||||
[Inject] private CameraStateMachine _cameraStateMachine;
|
||||
|
||||
public override async UniTask DecideAction(CancellationToken ctx)
|
||||
{
|
||||
@@ -22,6 +25,8 @@ namespace Code.OfficeGame.BattleMode.Actions.Player
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.Confined;
|
||||
|
||||
((CameraBattleModeState)_cameraStateMachine.CurrentBaseState).battleDeciding = true;
|
||||
|
||||
await _battleActionDecisionPanel.Open(ctx);
|
||||
|
||||
decidedAction = await _battleActionDecisionPanel.GetDecision(ctx);
|
||||
@@ -31,6 +36,8 @@ namespace Code.OfficeGame.BattleMode.Actions.Player
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
|
||||
((CameraBattleModeState)_cameraStateMachine.CurrentBaseState).battleDeciding = false;
|
||||
|
||||
await _battleActionDecisionPanel.Close(ctx);
|
||||
|
||||
decision = await BattleActions[decidedAction].DecideAction();
|
||||
@@ -42,6 +49,7 @@ namespace Code.OfficeGame.BattleMode.Actions.Player
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SetCurrentAction(BattleActions[decidedAction], decision.FrameDuration);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions.Player
|
||||
{
|
||||
public class PlayerDecisionMarker : MonoBehaviour
|
||||
{
|
||||
public bool locked;
|
||||
public void Toggle(bool onOff)
|
||||
{
|
||||
locked = false;
|
||||
gameObject.SetActive(onOff);
|
||||
}
|
||||
|
||||
public void MoveMarker(Vector3 position)
|
||||
{
|
||||
if (locked) return;
|
||||
|
||||
transform.position = position;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6dcb7d02c6a54c0a9758279c38260aef
|
||||
timeCreated: 1793143524
|
||||
@@ -0,0 +1,13 @@
|
||||
using Code.Infrastructure.Generators;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions.Player
|
||||
{
|
||||
// TODO Эта штука просто загружена вместе с конфигом
|
||||
[Config("Configs/PlayerDecisionMarker")]
|
||||
[CreateAssetMenu(fileName = "PlayerDecisionMarkerConfig", menuName = "Configs/PlayerDecisionMarker")]
|
||||
public class PlayerDecisionMarkerConfig : ScriptableObject
|
||||
{
|
||||
public PlayerDecisionMarker PlayerDecisionMarkerPrefab;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ae7c4b6492048df8d5bbb43e7909af0
|
||||
timeCreated: 1793143622
|
||||
Reference in new issue
Block a user