Better action system
This commit is contained in:
1 parent
2bd71f8dc5
commit
71bb4c3b5b
110 files changed
+73523
-86288
No files matched your search
@@ -73,6 +73,12 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 365138593effa4e45a0b1bcffe59ccd9
|
||||
m_Address: Assets/OfficeGame/Battle/Battle.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- SceneInfo
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 38887ff0efb114a4a8fc74ab7a35b7de
|
||||
m_Address: Assets/OfficeGame/Battle/UI/Timeline.asset
|
||||
m_ReadOnly: 0
|
||||
@@ -144,6 +150,11 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: ed7956ff40f7c4081816e553a1333dd7
|
||||
m_Address: Assets/OfficeGame/Battle/Battle.unity
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
m_ReadOnly: 0
|
||||
m_Settings: {fileID: 11400000, guid: fca3ff8b9d20369af80cdf3da2a95a6f, type: 2}
|
||||
m_SchemaSet:
|
||||
|
||||
@@ -65,14 +65,8 @@ namespace Code.Game.TestingLevel
|
||||
.AsUniTask();
|
||||
|
||||
var factoryConfig = new SingleConfig<PlayerFactorySettings>();
|
||||
|
||||
var playerDecisionMarkerConfig = new SingleConfig<PlayerDecisionMarkerConfig>();
|
||||
var attackActionsConfigs = new MultipleConfig<BattleActionParameters>();
|
||||
|
||||
await UniTask.WhenAll(
|
||||
factoryConfig.LoadConfig(),
|
||||
attackActionsConfigs.LoadConfigs(),
|
||||
playerDecisionMarkerConfig.LoadConfig());
|
||||
await factoryConfig.LoadConfig();
|
||||
|
||||
var factory = new PlayerFactory(factoryConfig);
|
||||
var player = await factory.CreatePlayer();
|
||||
@@ -80,36 +74,19 @@ namespace Code.Game.TestingLevel
|
||||
var playerMovementController = player.GetComponent<MovementController>();
|
||||
var playerControlsProvider = player.GetComponent<PlayerControlsProvider>();
|
||||
var playerAnimatorProvider = player.GetComponent<EntityAnimator>();
|
||||
var playerTimelineActor = player.GetComponent<PlayerControlledTimelineActor>();
|
||||
var playerProperties = player.GetComponent<EntityProperties>();
|
||||
|
||||
playerMovementController.Freeze = true;
|
||||
|
||||
BattleActionDecisionPanel battleActionDecisionPanel =
|
||||
(BattleActionDecisionPanel)await Context.UIFactory
|
||||
.LoadPanel(UIPanelType.BattleActionDecision, false);
|
||||
|
||||
BattleTimelinePanel battleTimelinePanel =
|
||||
(BattleTimelinePanel)await Context.UIFactory
|
||||
.LoadPanel(UIPanelType.BattleTimelinePanel, false);
|
||||
|
||||
MarkerManager markerManager = new(playerDecisionMarkerConfig);
|
||||
|
||||
void InstallExtra(Scene scene, ContainerBuilder builder)
|
||||
{
|
||||
builder.RegisterValue(attackActionsConfigs);
|
||||
builder.RegisterValue(playerDecisionMarkerConfig);
|
||||
builder.RegisterValue(markerManager);
|
||||
|
||||
builder.RegisterValue(factoryConfig);
|
||||
builder.RegisterValue(factory, new[] { typeof(IPlayerFactory) });
|
||||
builder.RegisterValue(playerKinematicCharacterMotor);
|
||||
builder.RegisterValue(playerMovementController);
|
||||
builder.RegisterValue(playerControlsProvider);
|
||||
builder.RegisterValue(playerAnimatorProvider);
|
||||
builder.RegisterValue(playerTimelineActor);
|
||||
|
||||
builder.RegisterValue(battleActionDecisionPanel);
|
||||
builder.RegisterValue(battleTimelinePanel);
|
||||
builder.RegisterValue(playerProperties);
|
||||
}
|
||||
|
||||
await UniTask.WhenAll(
|
||||
@@ -119,6 +96,7 @@ namespace Code.Game.TestingLevel
|
||||
LoadSceneMode.Single,
|
||||
true,
|
||||
InstallExtra),
|
||||
//////
|
||||
Context.SceneLoader
|
||||
.LoadSceneAsync(
|
||||
SceneId.FirstTestingSegment,
|
||||
@@ -128,7 +106,8 @@ namespace Code.Game.TestingLevel
|
||||
.LoadSceneAsync(
|
||||
SceneId.SecondTestingSegment,
|
||||
LoadSceneMode.Additive,
|
||||
false),
|
||||
false),
|
||||
//////
|
||||
waitForContainer
|
||||
);
|
||||
|
||||
@@ -138,14 +117,7 @@ namespace Code.Game.TestingLevel
|
||||
.SetPositionAndRotation(
|
||||
container.Resolve<TestingLevelData>().playerSpawnPoint.position,
|
||||
container.Resolve<TestingLevelData>().playerSpawnPoint.rotation);
|
||||
|
||||
var entities =
|
||||
Object.FindObjectsByType<EntityTimelineActor>()
|
||||
.Select(x => x.gameObject)
|
||||
.ToList();
|
||||
|
||||
GameObjectInjector.InjectRecursiveMany(entities, container);
|
||||
|
||||
|
||||
playerMovementController.Freeze = false;
|
||||
}
|
||||
|
||||
|
||||
+147
-151
@@ -1,151 +1,147 @@
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Code.Infrastructure.Input;
|
||||
using Code.Infrastructure.Utils;
|
||||
using Code.OfficeGame.BattleMode.Actions.HoloCopy;
|
||||
using Code.OfficeGame.BattleMode.HitBoxes;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Reflex.Attributes;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions.Attacks
|
||||
{
|
||||
public class BattleActionPlayerAttackMMA : BattleAction
|
||||
{
|
||||
[SerializeField] private HoloCop holoCop;
|
||||
[SerializeField] private Animator animator;
|
||||
private EntityHitBoxes _entityHitBoxes;
|
||||
private AttackActionConfig _attackData;
|
||||
public int EntryStateHash => Animator.StringToHash("WalkBlend");
|
||||
|
||||
private int _currentFrame;
|
||||
private IInputService _inputService;
|
||||
private CancellationTokenSource _waitForEnterTokenSource;
|
||||
private BattleActionDecisionResultCode _decisionResultCode;
|
||||
|
||||
[Inject]
|
||||
public void Construct(MultipleConfig<BattleActionParameters> attackData, IInputService inputService)
|
||||
{
|
||||
_inputService = inputService;
|
||||
|
||||
_entityHitBoxes = GetComponent<EntityHitBoxes>();
|
||||
|
||||
_attackData = (AttackActionConfig) attackData.Configs.SingleOrDefault(x=>x.ActionType == ActionType);
|
||||
}
|
||||
|
||||
public override async UniTask<BattleActionDecisionResult> DecideAction()
|
||||
{
|
||||
_currentFrame = 0;
|
||||
Finished = false;
|
||||
|
||||
_waitForEnterTokenSource = new CancellationTokenSource();
|
||||
_decisionResultCode = BattleActionDecisionResultCode.CancelDecision;
|
||||
|
||||
_inputService.BindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Confirm,
|
||||
ConfirmAttack);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Cancel,
|
||||
CancelAttack);
|
||||
|
||||
holoCop.Simulate(TickHoloCopy, _waitForEnterTokenSource.Token).Forget();
|
||||
|
||||
await UniTask.WaitUntilCanceled(_waitForEnterTokenSource.Token).SuppressCancellationThrow();
|
||||
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Confirm,
|
||||
ConfirmAttack);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Cancel,
|
||||
CancelAttack);
|
||||
|
||||
_currentFrame = 0;
|
||||
|
||||
return new() { ResultCode = _decisionResultCode, FrameDuration = _attackData.TotalFrames};
|
||||
}
|
||||
|
||||
private void CancelAttack(InputAction.CallbackContext obj)
|
||||
{
|
||||
_decisionResultCode = BattleActionDecisionResultCode.CancelDecision;
|
||||
_waitForEnterTokenSource?.Cancel();
|
||||
}
|
||||
|
||||
private void ConfirmAttack(InputAction.CallbackContext obj)
|
||||
{
|
||||
_decisionResultCode = BattleActionDecisionResultCode.Decided;
|
||||
_waitForEnterTokenSource?.Cancel();
|
||||
}
|
||||
|
||||
public override BattleActionType ActionType => BattleActionType.PlayerAttackMMA;
|
||||
|
||||
public override void Tick(float tickDelta)
|
||||
{
|
||||
if (Finished) return;
|
||||
|
||||
if (_currentFrame == 0)
|
||||
{
|
||||
// TODO Root Motion не должен быть использован в нормальных анимациях
|
||||
animator.applyRootMotion = true;
|
||||
animator.Play(_attackData.StateHash, 0, 0f);
|
||||
}
|
||||
|
||||
_currentFrame++;
|
||||
|
||||
if (_currentFrame >= _attackData.HitboxStartFrame && _currentFrame <= _attackData.HitboxEndFrame)
|
||||
{
|
||||
_entityHitBoxes.EnableHitbox(_attackData.AttackingBodyPart);
|
||||
_entityHitBoxes.CheckHitsForCurrentFrame(OnEnemyHit);
|
||||
}
|
||||
else
|
||||
{
|
||||
_entityHitBoxes.DisableAllHitboxes();
|
||||
}
|
||||
|
||||
if (_currentFrame >= _attackData.TotalFrames)
|
||||
{
|
||||
CompleteOrInterruptAction();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEnemyHit(Collider enemyCollider)
|
||||
{
|
||||
Debug.Log($"Попадание в {enemyCollider.name} на {_currentFrame}-м кадре! Урон: {_attackData.Damage}");
|
||||
var entityActor = enemyCollider.GetComponentInParent<EntityTimelineActor>();
|
||||
entityActor.ForceDecideAction(BattleActionType.Stugger);
|
||||
}
|
||||
|
||||
public void CompleteOrInterruptAction()
|
||||
{
|
||||
animator.Play(EntryStateHash, 0, 0f); // Создать None State и кинуть эту штуку туда
|
||||
animator.Update(0f);
|
||||
_entityHitBoxes.DisableAllHitboxes();
|
||||
|
||||
// TODO С нормальными анимациями не нужен будет рут моушен√
|
||||
animator.applyRootMotion = false;
|
||||
animator.transform.localPosition = Vector3.zero;
|
||||
animator.transform.localRotation = Quaternion.identity;
|
||||
|
||||
Finished = true;
|
||||
}
|
||||
|
||||
// HoloCopy
|
||||
|
||||
private bool TickHoloCopy(HoloCop holoCop, float tickDelta)
|
||||
{
|
||||
if (_currentFrame == 0)
|
||||
{
|
||||
holoCop.Animator.applyRootMotion = true;
|
||||
holoCop.Animator.Play(_attackData.StateHash, 0, 0f);
|
||||
}
|
||||
|
||||
_currentFrame++;
|
||||
|
||||
if(_currentFrame >= _attackData.TotalFrames)
|
||||
{
|
||||
_currentFrame = 0;
|
||||
holoCop.Animator.applyRootMotion = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// using System.Linq;
|
||||
// using System.Threading;
|
||||
// using Code.Infrastructure.Input;
|
||||
// using Code.Infrastructure.Utils;
|
||||
// using Code.OfficeGame.BattleMode.Actions.Deciders;
|
||||
// using Code.OfficeGame.BattleMode.Actions.HoloCopy;
|
||||
// using Code.OfficeGame.BattleMode.HitBoxes;
|
||||
// using Cysharp.Threading.Tasks;
|
||||
// using Reflex.Attributes;
|
||||
// using UnityEngine;
|
||||
// using UnityEngine.InputSystem;
|
||||
//
|
||||
// namespace Code.OfficeGame.BattleMode.Actions.Attacks
|
||||
// {
|
||||
// public class BattleActionPlayerAttackMMA : BattleAction
|
||||
// {
|
||||
// [SerializeField] private HoloCop holoCop;
|
||||
// [SerializeField] private Animator animator;
|
||||
// private EntityHitBoxes _entityHitBoxes;
|
||||
// private AttackActionConfig _attackData;
|
||||
// public int EntryStateHash => Animator.StringToHash("WalkBlend");
|
||||
//
|
||||
// private int _currentFrame;
|
||||
// private IInputService _inputService;
|
||||
// private CancellationTokenSource _waitForEnterTokenSource;
|
||||
// private BattleActionDecisionResultCode _decisionResultCode;
|
||||
//
|
||||
// [Inject]
|
||||
// public void Construct(MultipleConfig<BattleActionParameters> attackData, IInputService inputService)
|
||||
// {
|
||||
// _inputService = inputService;
|
||||
//
|
||||
// _entityHitBoxes = GetComponent<EntityHitBoxes>();
|
||||
//
|
||||
// _attackData = (AttackActionConfig) attackData.Configs.SingleOrDefault(x=>x.ActionType == ActionType);
|
||||
// }
|
||||
//
|
||||
// public override async UniTask<BattleActionDecisionResult> DecideAction()
|
||||
// {
|
||||
// _currentFrame = 0;
|
||||
// Finished = false;
|
||||
//
|
||||
// _waitForEnterTokenSource = new CancellationTokenSource();
|
||||
// _decisionResultCode = BattleActionDecisionResultCode.CancelDecision;
|
||||
//
|
||||
// _inputService.BindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Confirm,
|
||||
// ConfirmAttack);
|
||||
// _inputService.BindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Cancel,
|
||||
// CancelAttack);
|
||||
//
|
||||
// holoCop.Simulate(TickHoloCopy, _waitForEnterTokenSource.Token).Forget();
|
||||
//
|
||||
// await UniTask.WaitUntilCanceled(_waitForEnterTokenSource.Token).SuppressCancellationThrow();
|
||||
//
|
||||
// _inputService.UnbindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Confirm,
|
||||
// ConfirmAttack);
|
||||
// _inputService.UnbindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Cancel,
|
||||
// CancelAttack);
|
||||
//
|
||||
// _currentFrame = 0;
|
||||
//
|
||||
// return new() { ResultCode = _decisionResultCode, FrameDuration = _attackData.TotalFrames};
|
||||
// }
|
||||
//
|
||||
// private void CancelAttack(InputAction.CallbackContext obj)
|
||||
// {
|
||||
// _decisionResultCode = BattleActionDecisionResultCode.CancelDecision;
|
||||
// _waitForEnterTokenSource?.Cancel();
|
||||
// }
|
||||
//
|
||||
// private void ConfirmAttack(InputAction.CallbackContext obj)
|
||||
// {
|
||||
// _decisionResultCode = BattleActionDecisionResultCode.Decided;
|
||||
// _waitForEnterTokenSource?.Cancel();
|
||||
// }
|
||||
//
|
||||
// public override BattleActionType ActionType => BattleActionType.PlayerAttackMMA;
|
||||
//
|
||||
// public override bool Tick(float tickDelta, EntityProperties entity)
|
||||
// {
|
||||
// if (Finished) return;
|
||||
//
|
||||
// if (_currentFrame == 0)
|
||||
// {
|
||||
// // TODO Root Motion не должен быть использован в нормальных анимациях
|
||||
// animator.applyRootMotion = true;
|
||||
// animator.Play(_attackData.StateHash, 0, 0f);
|
||||
// }
|
||||
//
|
||||
// _currentFrame++;
|
||||
//
|
||||
// if (_currentFrame >= _attackData.HitboxStartFrame && _currentFrame <= _attackData.HitboxEndFrame)
|
||||
// {
|
||||
// _entityHitBoxes.CheckHitsForCurrentFrame(OnEnemyHit, HitBoxPartType.LArm);
|
||||
// }
|
||||
//
|
||||
// if (_currentFrame >= _attackData.TotalFrames)
|
||||
// {
|
||||
// CompleteOrInterruptAction();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public override DeciderType DeciderType => DeciderType.Position;
|
||||
//
|
||||
// private void OnEnemyHit(Collider enemyCollider)
|
||||
// {
|
||||
// Debug.Log($"Попадание в {enemyCollider.name} на {_currentFrame}-м кадре! Урон: {_attackData.Damage}");
|
||||
// var entityActor = enemyCollider.GetComponentInParent<EntityTimelineActor>();
|
||||
// entityActor.ForceDecideAction(BattleActionType.Stugger);
|
||||
// }
|
||||
//
|
||||
// public void CompleteOrInterruptAction()
|
||||
// {
|
||||
// animator.Play(EntryStateHash, 0, 0f); // Создать None State и кинуть эту штуку туда
|
||||
// animator.Update(0f);
|
||||
//
|
||||
// // TODO С нормальными анимациями не нужен будет рут моушен√
|
||||
// animator.applyRootMotion = false;
|
||||
// animator.transform.localPosition = Vector3.zero;
|
||||
// animator.transform.localRotation = Quaternion.identity;
|
||||
//
|
||||
// Finished = true;
|
||||
// }
|
||||
//
|
||||
// // HoloCopy
|
||||
//
|
||||
// private bool TickHoloCopy(HoloCop holoCop, float tickDelta)
|
||||
// {
|
||||
// if (_currentFrame == 0)
|
||||
// {
|
||||
// holoCop.Animator.applyRootMotion = true;
|
||||
// holoCop.Animator.Play(_attackData.StateHash, 0, 0f);
|
||||
// }
|
||||
//
|
||||
// _currentFrame++;
|
||||
//
|
||||
// if(_currentFrame >= _attackData.TotalFrames)
|
||||
// {
|
||||
// _currentFrame = 0;
|
||||
// holoCop.Animator.applyRootMotion = false;
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@@ -1,13 +1,13 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Code.OfficeGame.BattleMode.Actions.Deciders;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions
|
||||
{
|
||||
public abstract class BattleAction : MonoBehaviour
|
||||
public abstract class BattleAction
|
||||
{
|
||||
public bool Finished { get; protected set; }
|
||||
public abstract void Tick(float tickDelta);
|
||||
public abstract UniTask<BattleActionDecisionResult> DecideAction();
|
||||
public abstract bool Tick(float tickDelta, EntityProperties entity, BattleActionDecisionResult battleActionDecisionResult, BattleActionData battleActionData);
|
||||
public abstract BattleActionType ActionType { get; }
|
||||
public abstract DeciderType DeciderType { get; }
|
||||
public abstract BattleActionData MountAndGetFrames(EntityProperties entity, BattleActionDecisionResult result);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Code.OfficeGame.BattleMode.Actions
|
||||
{
|
||||
public abstract class BattleActionData
|
||||
{
|
||||
public int TotalFrames;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dec8cd0d83354b05a5766a6fd7f3db95
|
||||
timeCreated: 1793314110
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace Code.OfficeGame.BattleMode.Actions
|
||||
{
|
||||
public struct BattleActionDecisionResult
|
||||
{
|
||||
public BattleActionDecisionResultCode ResultCode;
|
||||
public int FrameDuration;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ using System.Threading;
|
||||
using Code.Game.Gameplay.Player;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.Input;
|
||||
using Code.OfficeGame.BattleMode.Actions.Deciders;
|
||||
using Code.OfficeGame.BattleMode.Actions.Player;
|
||||
using Code.OfficeGame.BattleMode.Marker;
|
||||
using Code.OfficeGame.BattleMode.Timeline;
|
||||
@@ -16,79 +17,61 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
{
|
||||
public class BattleActionMove : BattleAction
|
||||
{
|
||||
private CameraStateMachine _cameraStateMachine;
|
||||
private IInputService _inputService;
|
||||
private MovementController _movementController;
|
||||
|
||||
private NavMeshPath _path;
|
||||
private Vector3[] _corners;
|
||||
private int _currentCornerIndex;
|
||||
|
||||
private Vector3 _targetPosition;
|
||||
private LayerMask _navMeshMask;
|
||||
|
||||
private const float StoppingDistance = 0.15f;
|
||||
|
||||
[Inject]
|
||||
public void Construct(
|
||||
CameraStateMachine cameraStateMachine,
|
||||
IInputService inputService,
|
||||
MarkerManager markerManager)
|
||||
public override bool Tick(
|
||||
float tickDelta,
|
||||
EntityProperties entity,
|
||||
BattleActionDecisionResult battleActionDecisionResult,
|
||||
BattleActionData battleActionData)
|
||||
{
|
||||
_markerManager = markerManager;
|
||||
_cameraStateMachine = cameraStateMachine;
|
||||
_inputService = inputService;
|
||||
_movementController = GetComponent<MovementController>();
|
||||
_navMeshMask = LayerMask.GetMask("Environment");
|
||||
}
|
||||
var movementActionData = (MovementBattleActionData) battleActionData;
|
||||
|
||||
var entityMovementController = entity.MovementController;
|
||||
|
||||
public override void Tick(float tickDelta)
|
||||
{
|
||||
if (Finished) return;
|
||||
|
||||
if (_corners == null || _currentCornerIndex >= _corners.Length)
|
||||
if (movementActionData.Corners == null || movementActionData.CurrentCornerIndex >= movementActionData.Corners.Length)
|
||||
{
|
||||
StopMovementAndFinish();
|
||||
return;
|
||||
StopMovementAndFinish(entityMovementController);
|
||||
return true;
|
||||
}
|
||||
|
||||
Vector3 currentPos = _movementController.Motor.TransientPosition;
|
||||
Vector3 currentPos = entity.KinematicCharacterMotor.TransientPosition;
|
||||
|
||||
while (_currentCornerIndex < _corners.Length)
|
||||
while (movementActionData.CurrentCornerIndex < movementActionData.Corners.Length)
|
||||
{
|
||||
Vector3 toCorner = _corners[_currentCornerIndex] - currentPos;
|
||||
Vector3 toCorner = movementActionData.Corners[movementActionData.CurrentCornerIndex] - currentPos;
|
||||
toCorner.y = 0f;
|
||||
|
||||
if (toCorner.sqrMagnitude <= StoppingDistance * StoppingDistance)
|
||||
{
|
||||
_currentCornerIndex++;
|
||||
}
|
||||
movementActionData.CurrentCornerIndex++;
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (_currentCornerIndex >= _corners.Length)
|
||||
if (movementActionData.CurrentCornerIndex >= movementActionData.Corners.Length)
|
||||
{
|
||||
StopMovementAndFinish();
|
||||
StopMovementAndFinish(entity.MovementController);
|
||||
KinematicCharacterSystem.Simulate(
|
||||
tickDelta,
|
||||
KinematicCharacterSystem.CharacterMotors,
|
||||
KinematicCharacterSystem.PhysicsMovers
|
||||
);
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
Vector3 targetCorner = _corners[_currentCornerIndex];
|
||||
Vector3 targetCorner = movementActionData.Corners[movementActionData.CurrentCornerIndex];
|
||||
Vector3 moveDirection = targetCorner - currentPos;
|
||||
moveDirection.y = 0f;
|
||||
|
||||
float distance = moveDirection.magnitude;
|
||||
Vector3 moveNormal = distance > 0.0001f ? moveDirection / distance : Vector3.zero;
|
||||
|
||||
float maxStep = _movementController.MaxStableMoveSpeed * tickDelta;
|
||||
float inputMagnitude = (_currentCornerIndex == _corners.Length - 1 && distance < maxStep && maxStep > 0f)
|
||||
|
||||
float maxStep = entityMovementController.MaxStableMoveSpeed * tickDelta;
|
||||
float inputMagnitude =
|
||||
(movementActionData.CurrentCornerIndex == movementActionData.Corners.Length - 1
|
||||
&& distance < maxStep
|
||||
&& maxStep > 0f)
|
||||
? distance / maxStep
|
||||
: 1f;
|
||||
|
||||
@@ -97,11 +80,11 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
{
|
||||
MoveVector = moveNormal * inputMagnitude,
|
||||
Look = moveNormal.sqrMagnitude > 0.0001f
|
||||
? Quaternion.LookRotation(moveNormal, _movementController.Motor.CharacterUp)
|
||||
: _movementController.Motor.TransientRotation
|
||||
? Quaternion.LookRotation(moveNormal, entityMovementController.Motor.CharacterUp)
|
||||
: entityMovementController.Motor.TransientRotation
|
||||
};
|
||||
|
||||
_movementController.SetInputs(ref aiInputs);
|
||||
entityMovementController.SetInputs(ref aiInputs);
|
||||
|
||||
KinematicCharacterSystem.Simulate(
|
||||
tickDelta,
|
||||
@@ -109,110 +92,58 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
KinematicCharacterSystem.PhysicsMovers
|
||||
);
|
||||
|
||||
Vector3 postMovePos = _movementController.Motor.TransientPosition;
|
||||
Vector3 toFinal = _corners[^1] - postMovePos;
|
||||
Vector3 postMovePos = entityMovementController.Motor.TransientPosition;
|
||||
Vector3 toFinal = movementActionData.Corners[^1] - postMovePos;
|
||||
toFinal.y = 0f;
|
||||
|
||||
if (_currentCornerIndex >= _corners.Length - 1 && toFinal.sqrMagnitude <= StoppingDistance * StoppingDistance)
|
||||
if (movementActionData.CurrentCornerIndex >= movementActionData.Corners.Length - 1
|
||||
&& toFinal.sqrMagnitude <= StoppingDistance * StoppingDistance)
|
||||
{
|
||||
StopMovementAndFinish();
|
||||
StopMovementAndFinish(entityMovementController);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void StopMovementAndFinish()
|
||||
private void StopMovementAndFinish(MovementController movementController)
|
||||
{
|
||||
Debug.Log("MovementFinished");
|
||||
var emptyInputs = new AICharacterInputs
|
||||
{
|
||||
MoveVector = Vector3.zero,
|
||||
Look = _movementController.Motor.TransientRotation
|
||||
Look = movementController.Motor.TransientRotation
|
||||
};
|
||||
_movementController.SetInputs(ref emptyInputs);
|
||||
_movementController.Motor.BaseVelocity = Vector3.zero;
|
||||
|
||||
Finished = true;
|
||||
}
|
||||
|
||||
private CancellationTokenSource _waitForEnterTokenSource;
|
||||
private BattleActionDecisionResultCode _decisionResultCode;
|
||||
|
||||
public override async UniTask<BattleActionDecisionResult> DecideAction()
|
||||
{
|
||||
_waitForEnterTokenSource = new CancellationTokenSource();
|
||||
_decisionResultCode = BattleActionDecisionResultCode.CancelDecision;
|
||||
_targetPosition = _movementController.transform.position;
|
||||
|
||||
_inputService.BindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Select,
|
||||
SelectPosition);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Confirm,
|
||||
ConfirmPosition);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Cancel,
|
||||
CancelPosition);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Watchment,
|
||||
MarkPosition);
|
||||
|
||||
_playerLockedDecisionMarker = _markerManager.GetMarkerInstance();
|
||||
_playerDecisionMarker = _markerManager.GetMarkerInstance();
|
||||
_playerDecisionMarker.Toggle(true);
|
||||
|
||||
await UniTask.WaitUntilCanceled(_waitForEnterTokenSource.Token).SuppressCancellationThrow();
|
||||
|
||||
_playerDecisionMarker.Toggle(false);
|
||||
_markerManager.ReleaseMarkerInstance(_playerDecisionMarker);
|
||||
_markerManager.ReleaseMarkerInstance(_playerLockedDecisionMarker);
|
||||
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Select,
|
||||
SelectPosition);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Confirm,
|
||||
ConfirmPosition);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Cancel,
|
||||
CancelPosition);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Watchment,
|
||||
MarkPosition);
|
||||
|
||||
_waitForEnterTokenSource.Dispose();
|
||||
_waitForEnterTokenSource = null;
|
||||
|
||||
Finished = _decisionResultCode != BattleActionDecisionResultCode.Decided;
|
||||
|
||||
return new() { ResultCode = _decisionResultCode, FrameDuration = _totalFrames};
|
||||
movementController.SetInputs(ref emptyInputs);
|
||||
movementController.Motor.BaseVelocity = Vector3.zero;
|
||||
}
|
||||
|
||||
public override BattleActionType ActionType => BattleActionType.Move;
|
||||
public override DeciderType DeciderType => DeciderType.Position;
|
||||
|
||||
private int _totalFrames;
|
||||
private MarkerManager _markerManager;
|
||||
|
||||
private void CancelPosition(InputAction.CallbackContext obj)
|
||||
public override BattleActionData MountAndGetFrames(EntityProperties entity, BattleActionDecisionResult result)
|
||||
{
|
||||
_decisionResultCode = BattleActionDecisionResultCode.CancelDecision;
|
||||
_waitForEnterTokenSource?.Cancel();
|
||||
}
|
||||
|
||||
private void ConfirmPosition(InputAction.CallbackContext input)
|
||||
{
|
||||
Vector3 startPos = _movementController.Motor.TransientPosition;
|
||||
|
||||
_path = new();
|
||||
MovementBattleActionData movementBattleActionData = new();
|
||||
|
||||
if ((_targetPosition - startPos).sqrMagnitude > StoppingDistance * StoppingDistance
|
||||
&& NavMesh.CalculatePath(startPos, _targetPosition, NavMesh.AllAreas, _path)
|
||||
&& _path.corners.Length > 0)
|
||||
{
|
||||
_corners = _path.corners;
|
||||
_currentCornerIndex = _corners.Length > 1 ? 1 : 0;
|
||||
_decisionResultCode = BattleActionDecisionResultCode.Decided;
|
||||
_totalFrames = CalculatePathFrames(_corners);
|
||||
}
|
||||
else
|
||||
{
|
||||
_decisionResultCode = BattleActionDecisionResultCode.Deciding;
|
||||
_totalFrames = 0;
|
||||
}
|
||||
Vector3 startPos = entity.KinematicCharacterMotor.TransientPosition;
|
||||
|
||||
_waitForEnterTokenSource?.Cancel();
|
||||
NavMeshPath path = new();
|
||||
|
||||
var positionDecisionResult = (PositionBattleActionDeciderResult) result;
|
||||
|
||||
if ((positionDecisionResult.Position - startPos).sqrMagnitude > StoppingDistance * StoppingDistance
|
||||
&& NavMesh.CalculatePath(startPos, positionDecisionResult.Position, NavMesh.AllAreas, path)
|
||||
&& path.corners.Length > 0)
|
||||
{
|
||||
movementBattleActionData.Corners = path.corners;
|
||||
movementBattleActionData.CurrentCornerIndex = movementBattleActionData.Corners.Length > 1 ? 1 : 0;
|
||||
movementBattleActionData.TotalFrames = CalculatePathFrames(movementBattleActionData.Corners, entity.MovementController);
|
||||
}
|
||||
else movementBattleActionData.TotalFrames = 0;
|
||||
|
||||
return movementBattleActionData;
|
||||
}
|
||||
private int CalculatePathFrames(Vector3[] corners)
|
||||
private int CalculatePathFrames(Vector3[] corners, MovementController movementController)
|
||||
{
|
||||
if (corners == null || corners.Length < 2)
|
||||
return 0;
|
||||
@@ -228,42 +159,12 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
|
||||
float effectiveDistance = Mathf.Max(0f, totalDistanceXZ - StoppingDistance);
|
||||
|
||||
float stepPerFrame = _movementController.MaxStableMoveSpeed * BattleTimeline.TickDelta;
|
||||
float stepPerFrame = movementController.MaxStableMoveSpeed * BattleTimeline.TickDelta;
|
||||
|
||||
if (stepPerFrame <= 0.0001f)
|
||||
return 0;
|
||||
|
||||
// Округляем вверх, так как последний неполный шаг тоже занимает 1 целый кадр
|
||||
return Mathf.CeilToInt(effectiveDistance / stepPerFrame);
|
||||
}
|
||||
|
||||
private RaycastHit[] _hitBuffer = new RaycastHit[1];
|
||||
private Vector3 _lastViewedPosition;
|
||||
private PlayerDecisionMarker _playerDecisionMarker;
|
||||
private PlayerDecisionMarker _playerLockedDecisionMarker;
|
||||
|
||||
private void MarkPosition(InputAction.CallbackContext input)
|
||||
{
|
||||
var position = _cameraStateMachine.Camera.transform.position;
|
||||
var direction = _cameraStateMachine.Camera.transform.forward;
|
||||
|
||||
var hitCount = Physics.RaycastNonAlloc(position, direction, _hitBuffer, Mathf.Infinity, _navMeshMask);
|
||||
|
||||
if (hitCount == 0) return;
|
||||
|
||||
var hit = _hitBuffer[0];
|
||||
|
||||
_playerDecisionMarker.MoveMarker(hit.point);
|
||||
|
||||
_lastViewedPosition = hit.point;
|
||||
}
|
||||
|
||||
private void SelectPosition(InputAction.CallbackContext input)
|
||||
{
|
||||
_targetPosition = _lastViewedPosition;
|
||||
|
||||
_playerLockedDecisionMarker.MoveMarker(_targetPosition);
|
||||
_playerLockedDecisionMarker.Toggle(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,64 +1,64 @@
|
||||
using System.Linq;
|
||||
using Code.Infrastructure.Utils;
|
||||
using Code.OfficeGame.BattleMode.HitBoxes;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Reflex.Attributes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions
|
||||
{
|
||||
public class BattleActionStugger : BattleAction
|
||||
{
|
||||
private Animator _animator;
|
||||
private EntityHitBoxes _entityHitBoxes;
|
||||
private int EntryStateHash => Animator.StringToHash("WalkBlend");
|
||||
private int StuggerStateHash => Animator.StringToHash("Stugger");
|
||||
|
||||
private BattleActionParameters _actionParameters;
|
||||
|
||||
private int _currentFrame;
|
||||
|
||||
[Inject]
|
||||
public void Construct(MultipleConfig<BattleActionParameters> actionData)
|
||||
{
|
||||
_animator = GetComponentInChildren<Animator>();
|
||||
_entityHitBoxes = GetComponent<EntityHitBoxes>();
|
||||
_actionParameters = actionData.Configs.SingleOrDefault(x => x.ActionType == ActionType);
|
||||
}
|
||||
public override async UniTask<BattleActionDecisionResult> DecideAction()
|
||||
{
|
||||
await UniTask.Yield();
|
||||
|
||||
_currentFrame = 0;
|
||||
Finished = false;
|
||||
|
||||
return new() { ResultCode = BattleActionDecisionResultCode.Decided, FrameDuration = _actionParameters.TotalFrames};
|
||||
|
||||
}
|
||||
|
||||
public override BattleActionType ActionType => BattleActionType.Stugger;
|
||||
|
||||
public override void Tick(float tickDelta)
|
||||
{
|
||||
if (Finished) return;
|
||||
|
||||
if (_currentFrame == 0)
|
||||
{
|
||||
_animator.Play(StuggerStateHash, 0, 0f);
|
||||
}
|
||||
|
||||
_currentFrame++;
|
||||
|
||||
if (_currentFrame >= _actionParameters.TotalFrames)
|
||||
{
|
||||
CompleteOrInterruptAction();
|
||||
}
|
||||
}
|
||||
|
||||
public void CompleteOrInterruptAction()
|
||||
{
|
||||
_animator.Play(EntryStateHash, 0, 0f); // Создать None State и кинуть эту штуку туда
|
||||
Finished = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// using System.Linq;
|
||||
// using Code.Infrastructure.Utils;
|
||||
// using Code.OfficeGame.BattleMode.HitBoxes;
|
||||
// using Cysharp.Threading.Tasks;
|
||||
// using Reflex.Attributes;
|
||||
// using UnityEngine;
|
||||
//
|
||||
// namespace Code.OfficeGame.BattleMode.Actions
|
||||
// {
|
||||
// public class BattleActionStugger : BattleAction
|
||||
// {
|
||||
// private Animator _animator;
|
||||
// private EntityHitBoxes _entityHitBoxes;
|
||||
// private int EntryStateHash => Animator.StringToHash("WalkBlend");
|
||||
// private int StuggerStateHash => Animator.StringToHash("Stugger");
|
||||
//
|
||||
// private BattleActionParameters _actionParameters;
|
||||
//
|
||||
// private int _currentFrame;
|
||||
//
|
||||
// [Inject]
|
||||
// public void Construct(MultipleConfig<BattleActionParameters> actionData)
|
||||
// {
|
||||
// _animator = GetComponentInChildren<Animator>();
|
||||
// _entityHitBoxes = GetComponent<EntityHitBoxes>();
|
||||
// _actionParameters = actionData.Configs.SingleOrDefault(x => x.ActionType == ActionType);
|
||||
// }
|
||||
// public override async UniTask<BattleActionDecisionResult> DecideAction()
|
||||
// {
|
||||
// await UniTask.Yield();
|
||||
//
|
||||
// _currentFrame = 0;
|
||||
// Finished = false;
|
||||
//
|
||||
// return new() { ResultCode = BattleActionDecisionResultCode.Decided, FrameDuration = _actionParameters.TotalFrames};
|
||||
//
|
||||
// }
|
||||
//
|
||||
// public override BattleActionType ActionType => BattleActionType.Stugger;
|
||||
//
|
||||
// public override bool Tick(float tickDelta, EntityProperties entity)
|
||||
// {
|
||||
// if (Finished) return;
|
||||
//
|
||||
// if (_currentFrame == 0)
|
||||
// {
|
||||
// _animator.Play(StuggerStateHash, 0, 0f);
|
||||
// }
|
||||
//
|
||||
// _currentFrame++;
|
||||
//
|
||||
// if (_currentFrame >= _actionParameters.TotalFrames)
|
||||
// {
|
||||
// CompleteOrInterruptAction();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public void CompleteOrInterruptAction()
|
||||
// {
|
||||
// _animator.Play(EntryStateHash, 0, 0f); // Создать None State и кинуть эту штуку туда
|
||||
// Finished = true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@@ -1,31 +1,32 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Code.OfficeGame.BattleMode.Actions.Deciders;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions
|
||||
{
|
||||
public class BattleActionWait : BattleAction
|
||||
{
|
||||
private int _waitFrames;
|
||||
public override void Tick(float tickDelta)
|
||||
public override bool Tick(float tickDelta,
|
||||
EntityProperties entity,
|
||||
BattleActionDecisionResult battleActionDecisionResult,
|
||||
BattleActionData battleActionData)
|
||||
{
|
||||
_waitFrames--;
|
||||
if (_waitFrames <= 0) Finished = true;
|
||||
}
|
||||
|
||||
public override async UniTask<BattleActionDecisionResult> DecideAction()
|
||||
{
|
||||
Finished = false;
|
||||
var waitActionData = (WaitBattleActionData) battleActionData;
|
||||
|
||||
await UniTask.Yield();
|
||||
|
||||
_waitFrames = 120;
|
||||
waitActionData.WaitFrames--;
|
||||
if (waitActionData.WaitFrames <= 0) return true;
|
||||
|
||||
return new()
|
||||
{
|
||||
ResultCode = BattleActionDecisionResultCode.Decided,
|
||||
FrameDuration = _waitFrames
|
||||
};
|
||||
return false;
|
||||
}
|
||||
|
||||
public override BattleActionType ActionType => BattleActionType.Wait;
|
||||
public override DeciderType DeciderType => DeciderType.AsIs;
|
||||
public override BattleActionData MountAndGetFrames(EntityProperties entity, BattleActionDecisionResult result)
|
||||
{
|
||||
WaitBattleActionData actionData = new()
|
||||
{
|
||||
WaitFrames = 120
|
||||
};
|
||||
|
||||
return actionData;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a5f1323a1c04e9ead8fa528427c62e0
|
||||
timeCreated: 1793278477
|
||||
@@ -0,0 +1,24 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions.Deciders
|
||||
{
|
||||
public class AsIsBattleActionDecider : BattleActionDecider
|
||||
{
|
||||
public override DeciderType DeciderType => DeciderType.AsIs;
|
||||
public override async UniTask<BattleActionDecisionResult> GetDecision()
|
||||
{
|
||||
await UniTask.Yield();
|
||||
|
||||
return new AsIsBattleActionDeciderResult()
|
||||
{
|
||||
ResultCode = BattleActionDecisionResultCode.Decided
|
||||
};
|
||||
}
|
||||
|
||||
public override void UnmountDecider()
|
||||
{ }
|
||||
|
||||
public override void MountDecider()
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2034bb40c0ea462baeac67d89aef0429
|
||||
timeCreated: 1793316764
|
||||
@@ -0,0 +1,15 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions.Deciders
|
||||
{
|
||||
public abstract class BattleActionDecider
|
||||
{
|
||||
public abstract DeciderType DeciderType { get; }
|
||||
protected bool IsMounted;
|
||||
public abstract UniTask<BattleActionDecisionResult> GetDecision();
|
||||
|
||||
public abstract void UnmountDecider();
|
||||
|
||||
public abstract void MountDecider();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b6762673a7f4e40979aa0bd6532f836
|
||||
timeCreated: 1793278644
|
||||
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions
|
||||
{
|
||||
public abstract class BattleActionDecisionResult
|
||||
{
|
||||
public BattleActionType ActionType;
|
||||
public BattleActionDecisionResultCode ResultCode;
|
||||
}
|
||||
public class PositionBattleActionDeciderResult : BattleActionDecisionResult
|
||||
{
|
||||
public Vector3 Position;
|
||||
public Quaternion Rotation;
|
||||
}
|
||||
public class FrameBattleActionDeciderResult : BattleActionDecisionResult
|
||||
{
|
||||
public int FrameCount;
|
||||
}
|
||||
public class AsIsBattleActionDeciderResult : BattleActionDecisionResult
|
||||
{
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,142 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.Input;
|
||||
using Code.OfficeGame.BattleMode.Actions.Player;
|
||||
using Code.OfficeGame.BattleMode.Marker;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions.Deciders
|
||||
{
|
||||
public class BattleActionPositionDecider : BattleActionDecider
|
||||
{
|
||||
private CameraStateMachine _cameraStateMachine;
|
||||
private IInputService _inputService;
|
||||
|
||||
private Vector3 _targetPosition;
|
||||
private LayerMask _navMeshMask;
|
||||
|
||||
private const float StoppingDistance = 0.15f;
|
||||
|
||||
public BattleActionPositionDecider(
|
||||
CameraStateMachine cameraStateMachine,
|
||||
IInputService inputService,
|
||||
MarkerManager markerManager)
|
||||
{
|
||||
_markerManager = markerManager;
|
||||
_cameraStateMachine = cameraStateMachine;
|
||||
_inputService = inputService;
|
||||
_navMeshMask = LayerMask.GetMask("Environment");
|
||||
}
|
||||
|
||||
private CancellationTokenSource _waitForEnterTokenSource;
|
||||
private BattleActionDecisionResultCode _decisionResultCode;
|
||||
|
||||
public override DeciderType DeciderType => DeciderType.Position;
|
||||
|
||||
public override async UniTask<BattleActionDecisionResult> GetDecision()
|
||||
{
|
||||
if (!IsMounted) throw new Exception("Decider is not mounted"); // А почему бы и нет?
|
||||
|
||||
_waitForEnterTokenSource = new CancellationTokenSource();
|
||||
_decisionResultCode = BattleActionDecisionResultCode.CancelDecision;
|
||||
|
||||
await UniTask.WaitUntilCanceled(_waitForEnterTokenSource.Token).SuppressCancellationThrow();
|
||||
|
||||
_waitForEnterTokenSource.Dispose();
|
||||
_waitForEnterTokenSource = null;
|
||||
|
||||
return new PositionBattleActionDeciderResult()
|
||||
{
|
||||
ResultCode = _decisionResultCode,
|
||||
Position = _targetPosition,
|
||||
};
|
||||
}
|
||||
|
||||
public override void UnmountDecider()
|
||||
{
|
||||
if (!IsMounted) return;
|
||||
|
||||
_playerDecisionMarker.Toggle(false);
|
||||
_markerManager.ReleaseMarkerInstance(_playerDecisionMarker);
|
||||
_markerManager.ReleaseMarkerInstance(_playerLockedDecisionMarker);
|
||||
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Select,
|
||||
SelectPosition);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Confirm,
|
||||
ConfirmPosition);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Cancel,
|
||||
CancelPosition);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Watchment,
|
||||
MarkPosition);
|
||||
|
||||
IsMounted = false;
|
||||
}
|
||||
|
||||
public override void MountDecider()
|
||||
{
|
||||
if (IsMounted) return;
|
||||
|
||||
_inputService.BindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Select,
|
||||
SelectPosition);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Confirm,
|
||||
ConfirmPosition);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Cancel,
|
||||
CancelPosition);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.BattleMode, (int)BattleModeActions.Watchment,
|
||||
MarkPosition);
|
||||
|
||||
_playerLockedDecisionMarker = _markerManager.GetMarkerInstance();
|
||||
_playerDecisionMarker = _markerManager.GetMarkerInstance();
|
||||
_playerDecisionMarker.Toggle(true);
|
||||
|
||||
IsMounted = true;
|
||||
}
|
||||
|
||||
private MarkerManager _markerManager;
|
||||
|
||||
private void CancelPosition(InputAction.CallbackContext obj)
|
||||
{
|
||||
_decisionResultCode = BattleActionDecisionResultCode.CancelDecision;
|
||||
_waitForEnterTokenSource?.Cancel();
|
||||
}
|
||||
|
||||
private void ConfirmPosition(InputAction.CallbackContext input)
|
||||
{
|
||||
_decisionResultCode = BattleActionDecisionResultCode.Decided;
|
||||
|
||||
_waitForEnterTokenSource?.Cancel();
|
||||
}
|
||||
|
||||
private RaycastHit[] _hitBuffer = new RaycastHit[1];
|
||||
private Vector3 _lastViewedPosition;
|
||||
private PlayerDecisionMarker _playerDecisionMarker;
|
||||
private PlayerDecisionMarker _playerLockedDecisionMarker;
|
||||
|
||||
private void MarkPosition(InputAction.CallbackContext input)
|
||||
{
|
||||
var position = _cameraStateMachine.Camera.transform.position;
|
||||
var direction = _cameraStateMachine.Camera.transform.forward;
|
||||
|
||||
var hitCount = Physics.RaycastNonAlloc(position, direction, _hitBuffer, Mathf.Infinity, _navMeshMask);
|
||||
|
||||
if (hitCount == 0) return;
|
||||
|
||||
var hit = _hitBuffer[0];
|
||||
|
||||
_playerDecisionMarker.MoveMarker(hit.point);
|
||||
|
||||
_lastViewedPosition = hit.point;
|
||||
}
|
||||
|
||||
private void SelectPosition(InputAction.CallbackContext input)
|
||||
{
|
||||
_targetPosition = _lastViewedPosition;
|
||||
|
||||
_playerLockedDecisionMarker.MoveMarker(_targetPosition);
|
||||
_playerLockedDecisionMarker.Toggle(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 220462a568ce470482b264d105953329
|
||||
timeCreated: 1793278626
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Code.OfficeGame.BattleMode.Actions.Deciders
|
||||
{
|
||||
public enum DeciderType
|
||||
{
|
||||
AsIs,
|
||||
Position
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 534386b84312450f997b33343b402f74
|
||||
timeCreated: 1793278491
|
||||
@@ -0,0 +1,15 @@
|
||||
using Code.Game.Gameplay.Player;
|
||||
using KinematicCharacterController;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions
|
||||
{
|
||||
public class EntityProperties : MonoBehaviour
|
||||
{
|
||||
public Animator animator;
|
||||
public BattleActionType[] battleActionTypes;
|
||||
|
||||
public MovementController MovementController;
|
||||
public KinematicCharacterMotor KinematicCharacterMotor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e4a996f851e47ca8fc906e7e89fdca5
|
||||
timeCreated: 1793291498
|
||||
@@ -1,51 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using Code.OfficeGame.BattleMode.Timeline;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using R3;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions
|
||||
{
|
||||
public abstract class EntityTimelineActor : MonoBehaviour
|
||||
{
|
||||
public BattleAction CurrentAction { get; protected set;}
|
||||
public bool Finished => CurrentAction == null || CurrentAction.Finished;
|
||||
|
||||
private readonly Subject<TimelineBattleAction> _onActionSet = new();
|
||||
public Observable<TimelineBattleAction> OnActionSet => _onActionSet;
|
||||
|
||||
protected void SetCurrentAction(BattleAction action, int durationInFrames)
|
||||
{
|
||||
CurrentAction = action;
|
||||
|
||||
_onActionSet.OnNext(new TimelineBattleAction
|
||||
{
|
||||
EntityId = gameObject.GetEntityId(),
|
||||
Frame = durationInFrames
|
||||
});
|
||||
}
|
||||
private void OnDestroy()
|
||||
{
|
||||
_onActionSet.Dispose();
|
||||
}
|
||||
|
||||
public abstract UniTask DecideAction(CancellationToken ctx);
|
||||
public abstract UniTaskVoid ForceDecideAction(BattleActionType actionType);
|
||||
|
||||
[DoNotSerialize] public Animator animator;
|
||||
|
||||
protected readonly Dictionary<BattleActionType, BattleAction> BattleActions = new();
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
animator = GetComponentInChildren<Animator>();
|
||||
|
||||
foreach (var action in GetComponents<BattleAction>())
|
||||
{
|
||||
BattleActions.Add(action.ActionType, action);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17efe885cebe451d9cc5db4706f13ffe
|
||||
timeCreated: 1792477417
|
||||
@@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions
|
||||
{
|
||||
public class MovementBattleActionData : BattleActionData
|
||||
{
|
||||
public Vector3 Position;
|
||||
public Quaternion Rotation;
|
||||
public NavMeshPath Path;
|
||||
public Vector3[] Corners;
|
||||
public int CurrentCornerIndex;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 39d3651a2dc5444ca0801b647b60d47e
|
||||
timeCreated: 1793314117
|
||||
@@ -1,62 +0,0 @@
|
||||
using System.Threading;
|
||||
using Code.Game.OfficeGame.BattleMode;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.OfficeGame.BattleMode.UI;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Reflex.Attributes;
|
||||
using UnityEngine;
|
||||
|
||||
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)
|
||||
{
|
||||
_battleActionDecisionPanel.SetEntityInfo(BattleActions);
|
||||
|
||||
BattleActionType decidedAction = BattleActionType.None;
|
||||
|
||||
BattleActionDecisionResult decision = new();
|
||||
|
||||
while (decidedAction == BattleActionType.None || ctx.IsCancellationRequested)
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.Confined;
|
||||
|
||||
((CameraBattleModeState)_cameraStateMachine.CurrentBaseState).battleDeciding = true;
|
||||
|
||||
await _battleActionDecisionPanel.Open(ctx);
|
||||
|
||||
decidedAction = await _battleActionDecisionPanel.GetDecision(ctx);
|
||||
|
||||
while (decidedAction != BattleActionType.None
|
||||
&& !ctx.IsCancellationRequested)
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
|
||||
((CameraBattleModeState)_cameraStateMachine.CurrentBaseState).battleDeciding = false;
|
||||
|
||||
await _battleActionDecisionPanel.Close(ctx);
|
||||
|
||||
decision = await BattleActions[decidedAction].DecideAction();
|
||||
|
||||
if (decision.ResultCode == BattleActionDecisionResultCode.CancelDecision)
|
||||
decidedAction = BattleActionType.None;
|
||||
|
||||
if (decision.ResultCode != BattleActionDecisionResultCode.Deciding)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SetCurrentAction(BattleActions[decidedAction], decision.FrameDuration);
|
||||
}
|
||||
|
||||
public override async UniTaskVoid ForceDecideAction(BattleActionType actionType)
|
||||
{
|
||||
var decision = await CurrentAction.DecideAction();
|
||||
SetCurrentAction(BattleActions[actionType], decision.FrameDuration);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f9f637cef8714ef1b5ec779d21630ebd
|
||||
timeCreated: 1792693336
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Code.OfficeGame.BattleMode.Actions
|
||||
{
|
||||
public class WaitBattleActionData : BattleActionData
|
||||
{
|
||||
public int WaitFrames;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1650fc3ffbfd48b0b2bd9a1b31988d8f
|
||||
timeCreated: 1793314128
|
||||
@@ -7,17 +7,26 @@ using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.Generators;
|
||||
using Code.Infrastructure.Input;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
using Code.Infrastructure.UI;
|
||||
using Code.Infrastructure.Utils;
|
||||
using Code.OfficeGame.BattleMode.Actions;
|
||||
using Code.OfficeGame.BattleMode.Actions.Deciders;
|
||||
using Code.OfficeGame.BattleMode.Actions.Player;
|
||||
using Code.OfficeGame.BattleMode.Marker;
|
||||
using Code.OfficeGame.BattleMode.Timeline;
|
||||
using Code.OfficeGame.BattleMode.UI;
|
||||
using Code.OfficeGame.Player;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using KinematicCharacterController;
|
||||
using ObservableCollections;
|
||||
using R3;
|
||||
using Reflex.Core;
|
||||
using Reflex.Enums;
|
||||
using Reflex.Injectors;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.SceneManagement;
|
||||
using Resolution = Reflex.Enums.Resolution;
|
||||
|
||||
namespace Code.Game.OfficeGame.GameStates
|
||||
{
|
||||
@@ -32,7 +41,7 @@ namespace Code.Game.OfficeGame.GameStates
|
||||
|
||||
private BattleTimeline _battleTimeline;
|
||||
private CancellationTokenSource _battleTokenSource = new CancellationTokenSource();
|
||||
|
||||
|
||||
public override async UniTask EnterState()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
@@ -44,23 +53,88 @@ namespace Code.Game.OfficeGame.GameStates
|
||||
|
||||
Context.InputService.EnableMap(ActionMappings.BattleMode);
|
||||
|
||||
var container = Context.SceneContainerManager.ScenesContainers[SceneId.Testing];
|
||||
|
||||
// T
|
||||
var entities =
|
||||
Object.FindObjectsByType<EntityTimelineActor>().ToList();
|
||||
|
||||
////// T
|
||||
var entities =
|
||||
Object.FindObjectsByType<EntityProperties>()
|
||||
.ToList();
|
||||
|
||||
Container container;
|
||||
|
||||
if (Context.StateMachine.CurrentState == AppStates.Testing)
|
||||
{
|
||||
var gameplayContainer = Context.SceneContainerManager.ScenesContainers[SceneId.Testing];
|
||||
|
||||
var waitForContainer =
|
||||
Context.SceneContainerManager.ScenesContainers
|
||||
.ObserveDictionaryAdd()
|
||||
.Where(x => x.Key == SceneId.Battle)
|
||||
.Take(1)
|
||||
.WaitAsync()
|
||||
.AsUniTask();
|
||||
|
||||
var playerDecisionMarkerConfig = new SingleConfig<PlayerDecisionMarkerConfig>();
|
||||
var attackActionsConfigs = new MultipleConfig<BattleActionParameters>();
|
||||
|
||||
await UniTask.WhenAll(
|
||||
attackActionsConfigs.LoadConfigs(),
|
||||
playerDecisionMarkerConfig.LoadConfig());
|
||||
|
||||
BattleActionDecisionPanel battleActionDecisionPanel =
|
||||
(BattleActionDecisionPanel)await Context.UIFactory
|
||||
.LoadPanel(UIPanelType.BattleActionDecision, false);
|
||||
|
||||
BattleTimelinePanel battleTimelinePanel =
|
||||
(BattleTimelinePanel)await Context.UIFactory
|
||||
.LoadPanel(UIPanelType.BattleTimelinePanel, false);
|
||||
|
||||
void InstallExtra(Scene scene, ContainerBuilder builder)
|
||||
{
|
||||
builder.SetParent(gameplayContainer);
|
||||
|
||||
builder.RegisterValue(attackActionsConfigs);
|
||||
builder.RegisterValue(playerDecisionMarkerConfig);
|
||||
|
||||
builder.RegisterType(typeof(MarkerManager), Lifetime.Singleton, Resolution.Eager);
|
||||
|
||||
builder.RegisterValue(battleActionDecisionPanel);
|
||||
builder.RegisterValue(battleTimelinePanel);
|
||||
|
||||
builder.RegisterType(typeof(BattleActionMove), new[]{ typeof(BattleAction) }, Lifetime.Singleton, Resolution.Eager);
|
||||
builder.RegisterType(typeof(BattleActionWait), new[]{ typeof(BattleAction) }, Lifetime.Singleton, Resolution.Eager);
|
||||
|
||||
builder.RegisterType(typeof(BattleActionPositionDecider), new[]{ typeof(BattleActionDecider) } , Lifetime.Singleton, Resolution.Eager);
|
||||
builder.RegisterType(typeof(AsIsBattleActionDecider), new[]{ typeof(BattleActionDecider) } , Lifetime.Singleton, Resolution.Eager);
|
||||
|
||||
builder.RegisterType(typeof(BattleTimeline), Lifetime.Singleton, Resolution.Eager);
|
||||
}
|
||||
|
||||
await UniTask.WhenAll(
|
||||
Context.SceneLoader
|
||||
.LoadSceneAsync(
|
||||
SceneId.Battle,
|
||||
LoadSceneMode.Additive,
|
||||
true,
|
||||
InstallExtra),
|
||||
waitForContainer
|
||||
);
|
||||
|
||||
container = Context.SceneContainerManager.ScenesContainers[SceneId.Battle];
|
||||
|
||||
///// T
|
||||
GameObjectInjector
|
||||
.InjectRecursiveMany(
|
||||
entities.Select(x => x.gameObject).ToList(), container);
|
||||
/////
|
||||
_battleTokenSource = new();
|
||||
|
||||
_battleTimeline = ConstructorInjector.Construct(typeof(BattleTimeline), container) as BattleTimeline;
|
||||
|
||||
|
||||
_battleTimeline = container.Resolve<BattleTimeline>();
|
||||
|
||||
Physics.simulationMode = SimulationMode.Script;
|
||||
KinematicCharacterSystem.EnsureCreation();
|
||||
KinematicCharacterSystem.Settings.AutoSimulation = false;
|
||||
KinematicCharacterSystem.Settings.Interpolate = false;
|
||||
|
||||
|
||||
TogglePlayerBattleMode(container, false);
|
||||
|
||||
await Context.Camera.SwitchState(CameraMode.BattleMode);
|
||||
@@ -70,9 +144,13 @@ namespace Code.Game.OfficeGame.GameStates
|
||||
entity.animator.enabled = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
container = Context.SceneContainerManager.ScenesContainers[SceneId.Battle];
|
||||
}
|
||||
|
||||
_battleTimeline?.RunBattleLoopAsync(entities, _battleTokenSource.Token).Forget();
|
||||
|
||||
_battleTimeline?.RunBattleLoopAsync(entities,_battleTokenSource.Token).Forget();
|
||||
|
||||
await container.Resolve<BattleTimelinePanel>().Open();
|
||||
}
|
||||
|
||||
@@ -81,7 +159,7 @@ namespace Code.Game.OfficeGame.GameStates
|
||||
container.Resolve<EntityAnimator>().Animator.enabled = enabled;
|
||||
container.Resolve<PlayerControlsProvider>().enabled = enabled;
|
||||
}
|
||||
|
||||
|
||||
private void ToggleBattleMode(InputAction.CallbackContext obj)
|
||||
{
|
||||
Context.StateMachine.SwitchState(AppStates.Testing).Forget();
|
||||
@@ -90,36 +168,38 @@ namespace Code.Game.OfficeGame.GameStates
|
||||
public override async UniTask ExitState()
|
||||
{
|
||||
if (Context.StateMachine.NextState == AppStates.Testing)
|
||||
{
|
||||
{
|
||||
_battleTokenSource.Cancel();
|
||||
_battleTokenSource.Dispose();
|
||||
|
||||
|
||||
Physics.simulationMode = SimulationMode.FixedUpdate;
|
||||
KinematicCharacterSystem.Settings.AutoSimulation = true;
|
||||
KinematicCharacterSystem.Settings.Interpolate = true;
|
||||
|
||||
var container = Context.SceneContainerManager.ScenesContainers[SceneId.Testing];
|
||||
|
||||
var container = Context.SceneContainerManager.ScenesContainers[SceneId.Battle];
|
||||
|
||||
TogglePlayerBattleMode(container, true);
|
||||
await container.Resolve<BattleTimelinePanel>().Close();
|
||||
|
||||
|
||||
// T
|
||||
var entities =
|
||||
Object.FindObjectsByType<EntityTimelineActor>().ToList();
|
||||
var entities =
|
||||
Object.FindObjectsByType<EntityProperties>().ToList();
|
||||
|
||||
foreach (var entity in entities)
|
||||
{
|
||||
entity.animator.enabled = false;
|
||||
}
|
||||
|
||||
await Context.SceneLoader.UnloadSceneAsync(SceneId.Battle);
|
||||
}
|
||||
|
||||
|
||||
#if UNITY_EDITOR
|
||||
Context.InputService.DisableMap(ActionMappings.Debug);
|
||||
|
||||
|
||||
Context.InputService.UnbindActionPerformed((int)ActionMappings.Debug, (int)DebugActions.ToggleBattleMode,
|
||||
ToggleBattleMode);
|
||||
#endif
|
||||
|
||||
|
||||
Context.InputService.DisableMap(ActionMappings.BattleMode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using R3;
|
||||
using Reflex.Core;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode
|
||||
{
|
||||
public class BattleStateSceneInstaller: MonoBehaviour, IInstaller, IDisposable
|
||||
{
|
||||
private IDisposable _onContainerBuildDisposable;
|
||||
|
||||
public void InstallBindings(ContainerBuilder containerBuilder)
|
||||
{
|
||||
_onContainerBuildDisposable = Observable
|
||||
.FromEvent<Container>(
|
||||
h => containerBuilder.OnContainerBuilt += h,
|
||||
h => containerBuilder.OnContainerBuilt -= h)
|
||||
.Subscribe(x => OnContainerBuilt(x).Forget());
|
||||
}
|
||||
|
||||
private ISceneContainerManager _sceneContainerManager;
|
||||
private async UniTaskVoid OnContainerBuilt(Container container)
|
||||
{
|
||||
await UniTask.Yield();
|
||||
|
||||
_onContainerBuildDisposable.Dispose();
|
||||
|
||||
_sceneContainerManager = container.Resolve<ISceneContainerManager>();
|
||||
_sceneContainerManager.ScenesContainers.Add(SceneId.Battle, container);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_sceneContainerManager.ScenesContainers.Remove(SceneId.Battle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 76d99016e7074ce2bf981a533ff1d1c2
|
||||
timeCreated: 1793316405
|
||||
@@ -7,63 +7,24 @@ namespace Code.OfficeGame.BattleMode.HitBoxes
|
||||
// TODO Добавить меотды отключения,чтобы не получать урон во время стаггера
|
||||
public class EntityHitBoxes : MonoBehaviour
|
||||
{
|
||||
[Serializable]
|
||||
public struct HitBoxPartCollider
|
||||
{
|
||||
public HitBoxPartType PartType;
|
||||
public BoxCollider Collider;
|
||||
}
|
||||
|
||||
[SerializeField] private HitBoxPartCollider[] bodyParts;
|
||||
[SerializeField] private Dictionary<HitBoxPartType, BoxCollider> bodyParts;
|
||||
private LayerMask _hitBoxLayerMask;
|
||||
|
||||
private readonly Dictionary<HitBoxPartType, BoxCollider> _colliderMap = new();
|
||||
private readonly Collider[] _hitResults = new Collider[8];
|
||||
|
||||
// Список уже поражённых целей за один взмах, чтобы один удар не наносил урон 8 раз за 8 активных кадров
|
||||
private readonly HashSet<GameObject> _alreadyHitTargets = new();
|
||||
|
||||
private HitBoxPartType? _activePart;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
foreach (var part in bodyParts)
|
||||
foreach (var part in bodyParts.Values)
|
||||
{
|
||||
part.Collider.enabled = false;
|
||||
_colliderMap[part.PartType] = part.Collider;
|
||||
part.enabled = false;
|
||||
}
|
||||
_hitBoxLayerMask = LayerMask.GetMask("HitBox");
|
||||
}
|
||||
|
||||
public void EnableHitbox(HitBoxPartType part)
|
||||
public void CheckHitsForCurrentFrame(Action<Collider> onNewTargetHit, HitBoxPartType hitBoxPartType)
|
||||
{
|
||||
if (_activePart == part) return;
|
||||
|
||||
_alreadyHitTargets.Clear();
|
||||
_activePart = part;
|
||||
|
||||
if (_colliderMap.TryGetValue(part, out var col))
|
||||
{
|
||||
col.enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void DisableAllHitboxes()
|
||||
{
|
||||
if (_activePart.HasValue && _colliderMap.TryGetValue(_activePart.Value, out var col))
|
||||
{
|
||||
col.enabled = false;
|
||||
}
|
||||
|
||||
_activePart = null;
|
||||
_alreadyHitTargets.Clear();
|
||||
}
|
||||
|
||||
public void CheckHitsForCurrentFrame(Action<Collider> onNewTargetHit)
|
||||
{
|
||||
if (!_activePart.HasValue) return;
|
||||
|
||||
BoxCollider box = _colliderMap[_activePart.Value];
|
||||
BoxCollider box = bodyParts[hitBoxPartType];
|
||||
Transform boxTransform = box.transform;
|
||||
|
||||
// Вычисляем точный мировой центр и размер коллайдера на кости в текущем кадре анимации
|
||||
@@ -98,7 +59,17 @@ namespace Code.OfficeGame.BattleMode.HitBoxes
|
||||
{
|
||||
Head,
|
||||
Chest,
|
||||
Arm,
|
||||
Leg
|
||||
LArm,
|
||||
LElbow,
|
||||
LWrist,
|
||||
LLeg,
|
||||
LKnee,
|
||||
LAnkle,
|
||||
RArm,
|
||||
RElbow,
|
||||
RWrist,
|
||||
RLeg,
|
||||
RKnee,
|
||||
RAnkle
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Code.Game.OfficeGame.BattleMode;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.OfficeGame.BattleMode.Actions;
|
||||
using Code.OfficeGame.BattleMode.Actions.Deciders;
|
||||
using Code.OfficeGame.BattleMode.UI;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using R3;
|
||||
@@ -17,14 +22,31 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
public ReadOnlyReactiveProperty<int> CurrentBattleFrame => _currentBattleFrame;
|
||||
|
||||
private readonly BattleTimelinePanel _timelinePanel;
|
||||
private List<EntityTimelineActor> _entities;
|
||||
private List<EntityProperties> _entities;
|
||||
private DisposableBag _battleSubscriptions;
|
||||
|
||||
private Dictionary<BattleActionType, BattleAction> _battleActions;
|
||||
private Dictionary<DeciderType, BattleActionDecider> _battleActionDeciders;
|
||||
|
||||
public BattleTimeline(BattleTimelinePanel timelinePanel)
|
||||
private Dictionary<EntityId, BattleActionDecisionResult> _actionDecisionResults = new();
|
||||
private Dictionary<EntityId, BattleActionData> _battleActionDatas = new();
|
||||
private BattleActionDecisionPanel _battleActionDecisionPanel;
|
||||
private CameraStateMachine _cameraStateMachine;
|
||||
|
||||
public BattleTimeline(
|
||||
BattleTimelinePanel timelinePanel,
|
||||
IEnumerable<BattleAction> battleActions,
|
||||
IEnumerable<BattleActionDecider> battleActionDeciders,
|
||||
BattleActionDecisionPanel battleActionDecisionPanel,
|
||||
CameraStateMachine cameraStateMachine)
|
||||
{
|
||||
_cameraStateMachine = cameraStateMachine;
|
||||
_battleActionDecisionPanel = battleActionDecisionPanel;
|
||||
_timelinePanel = timelinePanel;
|
||||
_battleActions = battleActions.ToDictionary(x=>x.ActionType);
|
||||
_battleActionDeciders = battleActionDeciders.ToDictionary(x => x.DeciderType);
|
||||
}
|
||||
public async UniTask RunBattleLoopAsync(List<EntityTimelineActor> entities, CancellationToken ctx)
|
||||
public async UniTask RunBattleLoopAsync(List<EntityProperties> entities, CancellationToken ctx)
|
||||
{
|
||||
_entities = entities;
|
||||
_currentBattleFrame.Value = 0;
|
||||
@@ -37,20 +59,20 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
.Subscribe(_timelinePanel.OnFrameTick)
|
||||
.AddTo(ref _battleSubscriptions);
|
||||
|
||||
foreach (var entity in entities)
|
||||
entity.OnActionSet
|
||||
.Subscribe(action =>
|
||||
{
|
||||
action.Frame += _currentBattleFrame.Value;
|
||||
_timelinePanel.SetAction(action);
|
||||
})
|
||||
.AddTo(ref _battleSubscriptions);
|
||||
// foreach (var entity in entities)
|
||||
// entity.OnActionSet
|
||||
// .Subscribe(action =>
|
||||
// {
|
||||
// action.Frame += _currentBattleFrame.Value;
|
||||
// _timelinePanel.SetAction(action);
|
||||
// })
|
||||
// .AddTo(ref _battleSubscriptions);
|
||||
|
||||
await DecideActions(_entities, ctx);
|
||||
|
||||
while (!IsBattleOver() && !ctx.IsCancellationRequested)
|
||||
while (!ctx.IsCancellationRequested)
|
||||
{
|
||||
List<EntityTimelineActor> entitiesNeedOrders = await PlayTimelineUntilPause(ctx);
|
||||
List<EntityProperties> entitiesNeedOrders = await PlayTimelineUntilPause(ctx);
|
||||
|
||||
await DecideActions(entitiesNeedOrders, ctx);
|
||||
}
|
||||
@@ -61,19 +83,32 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
}
|
||||
}
|
||||
|
||||
private async UniTask DecideActions(List<EntityTimelineActor> entityActionMakers, CancellationToken ct)
|
||||
private async UniTask DecideActions(List<EntityProperties> entities, CancellationToken ctx)
|
||||
{
|
||||
foreach (var entity in entityActionMakers)
|
||||
foreach (var entity in entities)
|
||||
{
|
||||
Debug.Log($"Deciding action for {entity.name}");
|
||||
await entity.DecideAction(ct);
|
||||
|
||||
var entityId = entity.GetEntityId();
|
||||
|
||||
_actionDecisionResults.Remove(entityId);
|
||||
|
||||
_actionDecisionResults[entityId] = await DecideAction(ctx, entity);
|
||||
|
||||
_battleActionDatas.Remove(entityId);
|
||||
|
||||
var decidedAction = _actionDecisionResults[entityId];
|
||||
|
||||
_battleActionDatas[entityId] =
|
||||
_battleActions[decidedAction.ActionType]
|
||||
.MountAndGetFrames(entity, decidedAction);
|
||||
}
|
||||
}
|
||||
|
||||
private async UniTask<List<EntityTimelineActor>> PlayTimelineUntilPause(CancellationToken ctx)
|
||||
private async UniTask<List<EntityProperties>> PlayTimelineUntilPause(CancellationToken ctx)
|
||||
{
|
||||
float accumulator = 0f;
|
||||
var readyEntities = new List<EntityTimelineActor>();
|
||||
var readyEntities = new List<EntityProperties>();
|
||||
|
||||
while (readyEntities.Count == 0 && !ctx.IsCancellationRequested)
|
||||
{
|
||||
@@ -93,16 +128,24 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
return readyEntities;
|
||||
}
|
||||
|
||||
private void SimulateSingleFrame(List<EntityTimelineActor> outReadyEntities)
|
||||
private void SimulateSingleFrame(List<EntityProperties> outReadyEntities)
|
||||
{
|
||||
_currentBattleFrame.Value++;
|
||||
|
||||
foreach (var entity in _entities)
|
||||
{
|
||||
entity.CurrentAction.Tick(TickDelta);
|
||||
var entityId = entity.GetEntityId();
|
||||
|
||||
var finished = _battleActions[_actionDecisionResults[entityId].ActionType]
|
||||
.Tick(
|
||||
TickDelta,
|
||||
entity,
|
||||
_actionDecisionResults[entityId],
|
||||
_battleActionDatas[entityId]);
|
||||
|
||||
entity.animator.Update(TickDelta);
|
||||
|
||||
if (entity.Finished)
|
||||
if (finished)
|
||||
{
|
||||
outReadyEntities.Add(entity);
|
||||
}
|
||||
@@ -112,6 +155,55 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
Physics.SyncTransforms();
|
||||
}
|
||||
|
||||
private bool IsBattleOver() => false;
|
||||
private async UniTask<BattleActionDecisionResult> DecideAction(CancellationToken ctx, EntityProperties entity)
|
||||
{
|
||||
_battleActionDecisionPanel.SetEntityInfo(entity.battleActionTypes);
|
||||
|
||||
BattleActionType decidedAction = BattleActionType.None;
|
||||
|
||||
BattleActionDecisionResult decision = null;
|
||||
|
||||
while (decidedAction == BattleActionType.None || ctx.IsCancellationRequested)
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.Confined;
|
||||
|
||||
((CameraBattleModeState)_cameraStateMachine.CurrentBaseState).battleDeciding = true;
|
||||
|
||||
await _battleActionDecisionPanel.Open(ctx);
|
||||
|
||||
decidedAction = await _battleActionDecisionPanel.GetDecision(ctx);
|
||||
|
||||
if (decidedAction == BattleActionType.None) continue;
|
||||
|
||||
var deciderType = _battleActions[decidedAction].DeciderType;
|
||||
|
||||
_battleActionDeciders[deciderType].MountDecider();
|
||||
|
||||
while (!ctx.IsCancellationRequested)
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
|
||||
((CameraBattleModeState)_cameraStateMachine.CurrentBaseState).battleDeciding = false;
|
||||
|
||||
await _battleActionDecisionPanel.Close(ctx);
|
||||
|
||||
decision = await _battleActionDeciders[deciderType].GetDecision();
|
||||
|
||||
if (decision.ResultCode == BattleActionDecisionResultCode.CancelDecision)
|
||||
decidedAction = BattleActionType.None;
|
||||
|
||||
if (decision.ResultCode != BattleActionDecisionResultCode.Deciding)
|
||||
break;
|
||||
}
|
||||
|
||||
_battleActionDeciders[deciderType].UnmountDecider();
|
||||
}
|
||||
|
||||
if (decision == null) throw new ArgumentNullException(nameof(decision));
|
||||
|
||||
decision.ActionType = decidedAction;
|
||||
|
||||
return decision;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,13 +20,13 @@ namespace Code.OfficeGame.BattleMode.UI
|
||||
private MotionHandle _motionHandle;
|
||||
private UniTaskCompletionSource<BattleActionType> _decisionCompletionSource;
|
||||
|
||||
public void SetEntityInfo(Dictionary<BattleActionType, BattleAction> battleActions)
|
||||
public void SetEntityInfo(BattleActionType[] battleActions)
|
||||
{
|
||||
foreach (var button in _actionButtons) Destroy(button.gameObject);
|
||||
|
||||
_actionButtons.Clear();
|
||||
|
||||
foreach (var action in battleActions.Keys)
|
||||
foreach (var action in battleActions)
|
||||
{
|
||||
var button = Instantiate(actionButtonPrefab, transform);
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ namespace Code.Infrastructure.SceneLoader
|
||||
public enum SceneId
|
||||
{
|
||||
Testing,
|
||||
Battle,
|
||||
FirstTestingSegment,
|
||||
SecondTestingSegment
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
%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: f8b44b2bf5414b47a94fc1633e021e94, type: 3}
|
||||
m_Name: Battle
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Infrastructure.SceneLoader.SceneInfo
|
||||
SceneAsset:
|
||||
m_AssetGUID: ed7956ff40f7c4081816e553a1333dd7
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
SceneId: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 365138593effa4e45a0b1bcffe59ccd9
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,183 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 10
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 13
|
||||
m_BakeOnSceneLoad: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 2
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 2
|
||||
m_PVRDenoiserTypeIndirect: 2
|
||||
m_PVRDenoiserTypeAO: 2
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &1449802056
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1449802059}
|
||||
- component: {fileID: 1449802058}
|
||||
- component: {fileID: 1449802060}
|
||||
m_Layer: 0
|
||||
m_Name: SceneScope
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1449802058
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1449802056}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5312032623c34414a54ea00e35a7eb8e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Reflex::Reflex.Core.ContainerScope
|
||||
--- !u!4 &1449802059
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1449802056}
|
||||
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: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1449802060
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1449802056}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 76d99016e7074ce2bf981a533ff1d1c2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.BattleStateSceneInstaller
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 1449802059}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ed7956ff40f7c4081816e553a1333dd7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -31,6 +31,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2632513295195526779}
|
||||
- {fileID: 7900315514221842018}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &8810757237738666909
|
||||
@@ -72,7 +73,7 @@ Transform:
|
||||
m_GameObject: {fileID: 5211050770166458882}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0.05, z: 0}
|
||||
m_LocalPosition: {x: 0, y: 0.1, z: 0}
|
||||
m_LocalScale: {x: 0.5, y: 0.1, z: 0.5}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -135,3 +136,95 @@ MeshRenderer:
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!1 &7583860374887296286
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7900315514221842018}
|
||||
- component: {fileID: 3267881084630362528}
|
||||
m_Layer: 0
|
||||
m_Name: Arrow
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7900315514221842018
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7583860374887296286}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1507626928637554511}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||
--- !u!212 &3267881084630362528
|
||||
SpriteRenderer:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7583860374887296286}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 21300000, guid: d13d3cfa993874a3aa610b2c4a7994d1, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
m_BlendShapeWeights: []
|
||||
Binary file not shown.
@@ -0,0 +1,144 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d13d3cfa993874a3aa610b2c4a7994d1
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -6549465403974112520
|
||||
second: pixel-arrow-png_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 5000
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 0
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationMethod: 0
|
||||
spriteTessellationDetail: -1
|
||||
spriteGeometrySubdivision: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 512
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: pixel-arrow-png_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1800
|
||||
height: 1800
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 8faa9676aef9b15a0800000000000000
|
||||
internalID: -6549465403974112520
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -894,11 +894,8 @@ GameObject:
|
||||
- component: {fileID: 1099954219580652693}
|
||||
- component: {fileID: 1169814968730905922}
|
||||
- component: {fileID: 1804673105121893182}
|
||||
- component: {fileID: 2855045673540557579}
|
||||
- component: {fileID: 1642146228553031303}
|
||||
- component: {fileID: 2915538842514811766}
|
||||
- component: {fileID: 3634170979914840227}
|
||||
- component: {fileID: 1066720593343024550}
|
||||
- component: {fileID: 7206607324510557172}
|
||||
m_Layer: 3
|
||||
m_Name: Companion
|
||||
m_TagString: Untagged
|
||||
@@ -1026,31 +1023,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 05290340b907438c8fcb9d5f0e75624f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.Player.PlayerAnimator
|
||||
--- !u!114 &2855045673540557579
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4619667822637681491}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f9f637cef8714ef1b5ec779d21630ebd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.Actions.Player.PlayerTimelineActor
|
||||
animator: {fileID: 7985122316552762893}
|
||||
--- !u!114 &1642146228553031303
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4619667822637681491}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 00995677816949ec99d2bd3546ec6597, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.Actions.BattleActionMove
|
||||
animator: {fileID: 0}
|
||||
--- !u!114 &2915538842514811766
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1066,7 +1039,7 @@ MonoBehaviour:
|
||||
m_Category:
|
||||
m_OverrideSprite: {fileID: 0}
|
||||
m_OnlyVariants: 0
|
||||
--- !u!114 &3634170979914840227
|
||||
--- !u!114 &7206607324510557172
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -1075,21 +1048,13 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 4619667822637681491}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5af678ef30f04b7093df4488ed133bff, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 8e4a996f851e47ca8fc906e7e89fdca5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.Actions.BattleActionWait
|
||||
--- !u!114 &1066720593343024550
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4619667822637681491}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 91ff2d61ed324b62957ec67153dcfcd5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.Actions.BattleActionStugger
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.Actions.EntityProperties
|
||||
animator: {fileID: 7985122316552762893}
|
||||
battleActionTypes: 0100000002000000i
|
||||
MovementController: {fileID: 1169814968730905922}
|
||||
KinematicCharacterMotor: {fileID: 1099954219580652693}
|
||||
--- !u!1 &4999618383784345993
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -1064,12 +1064,12 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4209953972262457848}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.72430015, y: -0.012503041, z: -0.0007734359, w: 0.6893711}
|
||||
m_LocalPosition: {x: -0.000058, y: 0.005081, z: 0.000887}
|
||||
m_LocalScale: {x: 0.0008310459, y: 0.0024236469, z: 0.0006792192}
|
||||
m_LocalRotation: {x: 0.27275798, y: 0.011116624, z: -0.03180616, w: 0.9614926}
|
||||
m_LocalPosition: {x: 0, y: 0.0011913115, z: -0.0003177984}
|
||||
m_LocalScale: {x: 0.00083104573, y: 0.002423644, z: 0.00067921897}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3906292621551865680}
|
||||
m_Father: {fileID: 167790739058109660}
|
||||
m_LocalEulerAnglesHint: {x: 93.028015, y: 20.335999, z: 21.287003}
|
||||
--- !u!33 &616105551075091780
|
||||
MeshFilter:
|
||||
@@ -1432,12 +1432,12 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6137683549794358498}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0.0040713265, y: 0.00013359914, z: 0.9999225, w: 0.011766074}
|
||||
m_LocalPosition: {x: 0.00094, y: -0.002123, z: 0.000101}
|
||||
m_LocalScale: {x: 0.0012496426, y: 0.004520786, z: 0.0010296222}
|
||||
m_LocalRotation: {x: -0.05578211, y: 0.14236857, z: 0.0013149006, w: 0.9882398}
|
||||
m_LocalPosition: {x: 0.0000618242, y: 0.0023535336, z: 0}
|
||||
m_LocalScale: {x: 0.0012496418, y: 0.004520785, z: 0.001029617}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7389322933388863146}
|
||||
m_Father: {fileID: 5817877072563037195}
|
||||
m_LocalEulerAnglesHint: {x: -0.021, y: -0.466, z: 178.652}
|
||||
--- !u!33 &1365653010233386965
|
||||
MeshFilter:
|
||||
@@ -1544,12 +1544,12 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6184966302830833165}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0.10030921, y: 0.065068245, z: 0.0061848094, w: 0.99280715}
|
||||
m_LocalPosition: {x: -0.000155, y: 0.006855, z: -0.000766}
|
||||
m_LocalScale: {x: 0.0009827293, y: 0.0045207865, z: 0.00096685736}
|
||||
m_LocalRotation: {x: 0.014902424, y: 0.06707111, z: 0.01011665, w: 0.9975856}
|
||||
m_LocalPosition: {x: -0.00014021885, y: 0.0023434416, z: -0.00023565153}
|
||||
m_LocalScale: {x: 0.0009827297, y: 0.0045207883, z: 0.00096685754}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5817877072563037195}
|
||||
m_Father: {fileID: 3906292621551865680}
|
||||
m_LocalEulerAnglesHint: {x: -11.536, y: 7.504, z: -0.045}
|
||||
--- !u!33 &6811389894975961246
|
||||
MeshFilter:
|
||||
@@ -1868,11 +1868,8 @@ GameObject:
|
||||
- component: {fileID: 382175622288203694}
|
||||
- component: {fileID: 3159895984765548440}
|
||||
- component: {fileID: 4790439060519472847}
|
||||
- component: {fileID: 7637701434054888247}
|
||||
- component: {fileID: 9173176013943361802}
|
||||
- component: {fileID: 2987723389966541299}
|
||||
- component: {fileID: 7894446171801488546}
|
||||
- component: {fileID: 4165226838920277257}
|
||||
- component: {fileID: 2770462520665863353}
|
||||
m_Layer: 3
|
||||
m_Name: Player
|
||||
m_TagString: Player
|
||||
@@ -2028,57 +2025,6 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.Player.PlayerAnimator
|
||||
animator: {fileID: 2511146916935397012}
|
||||
--- !u!114 &7637701434054888247
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8373156178643037624}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f9f637cef8714ef1b5ec779d21630ebd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.Actions.Player.PlayerTimelineActor
|
||||
animator: {fileID: 2511146916935397012}
|
||||
--- !u!114 &9173176013943361802
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8373156178643037624}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 00995677816949ec99d2bd3546ec6597, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.Actions.BattleActionMove
|
||||
--- !u!114 &2987723389966541299
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8373156178643037624}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5af678ef30f04b7093df4488ed133bff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.Actions.BattleActionWait
|
||||
--- !u!114 &7894446171801488546
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8373156178643037624}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a1803413768b4cf990d25732721300ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.Actions.Attacks.BattleActionPlayerAttackMMA
|
||||
holoCop: {fileID: 6894003323627830512}
|
||||
animator: {fileID: 2511146916935397012}
|
||||
--- !u!114 &4165226838920277257
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2092,34 +2038,50 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.HitBoxes.EntityHitBoxes
|
||||
bodyParts:
|
||||
- PartType: 0
|
||||
Collider: {fileID: 3522706116989207023}
|
||||
- PartType: 1
|
||||
Collider: {fileID: 655206764455231749}
|
||||
- PartType: 2
|
||||
Collider: {fileID: 3037738553142535498}
|
||||
- PartType: 2
|
||||
Collider: {fileID: 5647903028955042325}
|
||||
- PartType: 2
|
||||
Collider: {fileID: 7300801764049635117}
|
||||
- PartType: 2
|
||||
Collider: {fileID: 4323915070724217560}
|
||||
- PartType: 2
|
||||
Collider: {fileID: 8361666554869016227}
|
||||
- PartType: 2
|
||||
Collider: {fileID: 7937515106177813684}
|
||||
- PartType: 3
|
||||
Collider: {fileID: 5905880753699428578}
|
||||
- PartType: 3
|
||||
Collider: {fileID: 5059411505219296131}
|
||||
- PartType: 3
|
||||
Collider: {fileID: 8720973234742985159}
|
||||
- PartType: 3
|
||||
Collider: {fileID: 7643754156491508400}
|
||||
- PartType: 3
|
||||
Collider: {fileID: 2873132192154572844}
|
||||
- PartType: 3
|
||||
Collider: {fileID: 1759856401891365470}
|
||||
- key: 0
|
||||
value: {fileID: 3522706116989207023}
|
||||
- key: 1
|
||||
value: {fileID: 655206764455231749}
|
||||
- key: 2
|
||||
value: {fileID: 4323915070724217560}
|
||||
- key: 10
|
||||
value: {fileID: 7300801764049635117}
|
||||
- key: 5
|
||||
value: {fileID: 5905880753699428578}
|
||||
- key: 9
|
||||
value: {fileID: 5647903028955042325}
|
||||
- key: 8
|
||||
value: {fileID: 3037738553142535498}
|
||||
- key: 3
|
||||
value: {fileID: 8361666554869016227}
|
||||
- key: 4
|
||||
value: {fileID: 7937515106177813684}
|
||||
- key: 6
|
||||
value: {fileID: 5059411505219296131}
|
||||
- key: 7
|
||||
value: {fileID: 8720973234742985159}
|
||||
- key: 11
|
||||
value: {fileID: 7643754156491508400}
|
||||
- key: 12
|
||||
value: {fileID: 2873132192154572844}
|
||||
- key: 13
|
||||
value: {fileID: 1759856401891365470}
|
||||
--- !u!114 &2770462520665863353
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8373156178643037624}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8e4a996f851e47ca8fc906e7e89fdca5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.Actions.EntityProperties
|
||||
animator: {fileID: 2511146916935397012}
|
||||
battleActionTypes: 0100000002000000i
|
||||
MovementController: {fileID: 382175622288203694}
|
||||
KinematicCharacterMotor: {fileID: 2650801570508942627}
|
||||
--- !u!1001 &3151904053883985926
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2362,9 +2324,6 @@ PrefabInstance:
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects:
|
||||
- targetCorrespondingSourceObject: {fileID: 1531172710553138607, guid: 22f5406d0dd3e496dab66400ad658fb8, type: 3}
|
||||
insertIndex: 2
|
||||
addedObject: {fileID: 9119535480169676082}
|
||||
- targetCorrespondingSourceObject: {fileID: -9000482945971038761, guid: 22f5406d0dd3e496dab66400ad658fb8, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 5096828741742199434}
|
||||
@@ -2376,8 +2335,11 @@ PrefabInstance:
|
||||
addedObject: {fileID: 6090614937741773685}
|
||||
- targetCorrespondingSourceObject: {fileID: -6697214219869047026, guid: 22f5406d0dd3e496dab66400ad658fb8, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 6167498846344423629}
|
||||
addedObject: {fileID: 9119535480169676082}
|
||||
- targetCorrespondingSourceObject: {fileID: -4213672668784436139, guid: 22f5406d0dd3e496dab66400ad658fb8, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 6167498846344423629}
|
||||
- targetCorrespondingSourceObject: {fileID: 8207787990394109913, guid: 22f5406d0dd3e496dab66400ad658fb8, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 634979685279388310}
|
||||
- targetCorrespondingSourceObject: {fileID: 2559326207539228873, guid: 22f5406d0dd3e496dab66400ad658fb8, type: 3}
|
||||
@@ -2409,6 +2371,11 @@ PrefabInstance:
|
||||
addedObject: {fileID: 797494992160088194}
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 22f5406d0dd3e496dab66400ad658fb8, type: 3}
|
||||
--- !u!4 &167790739058109660 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 8207787990394109913, guid: 22f5406d0dd3e496dab66400ad658fb8, type: 3}
|
||||
m_PrefabInstance: {fileID: 8337279434272854789}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!4 &2307526933760529284 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: -3191349008443277183, guid: 22f5406d0dd3e496dab66400ad658fb8, type: 3}
|
||||
@@ -2459,11 +2426,6 @@ Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 2971445041314245674, guid: 22f5406d0dd3e496dab66400ad658fb8, type: 3}
|
||||
m_PrefabInstance: {fileID: 8337279434272854789}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!4 &7389322933388863146 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 1531172710553138607, guid: 22f5406d0dd3e496dab66400ad658fb8, type: 3}
|
||||
m_PrefabInstance: {fileID: 8337279434272854789}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!4 &7755835378787722939 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: -7489006422537243202, guid: 22f5406d0dd3e496dab66400ad658fb8, type: 3}
|
||||
|
||||
@@ -18,4 +18,4 @@ MonoBehaviour:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
SceneId: 1
|
||||
SceneId: 2
|
||||
@@ -18,4 +18,4 @@ MonoBehaviour:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
SceneId: 2
|
||||
SceneId: 3
|
||||
@@ -119,83 +119,6 @@ NavMeshSettings:
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1001 &122221512
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 8703872773187979205, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: a4ed31ac8857b954093ccf3805c7032f, type: 2}
|
||||
- target: {fileID: 8703872773187979207, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: a4ed31ac8857b954093ccf3805c7032f, type: 2}
|
||||
- target: {fileID: 8703872773187979209, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: a4ed31ac8857b954093ccf3805c7032f, type: 2}
|
||||
- target: {fileID: 8703872773187979211, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: a4ed31ac8857b954093ccf3805c7032f, type: 2}
|
||||
- target: {fileID: 8703872773187979213, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
propertyPath: 'm_Materials.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: a4ed31ac8857b954093ccf3805c7032f, type: 2}
|
||||
- target: {fileID: 8703872773199547215, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Unity_Chan_generic
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8703872773199976303, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -0.6588714
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8703872773199976303, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -0.74999976
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8703872773199976303, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0.9731576
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8703872773199976303, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.6932882
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8703872773199976303, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8703872773199976303, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0.7206605
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8703872773199976303, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8703872773199976303, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8703872773199976303, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: -92.218
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8703872773199976303, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 64c9d96775079344fac674889078804c, type: 3}
|
||||
--- !u!1 &383131409
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -291,5 +214,4 @@ SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 1449802059}
|
||||
- {fileID: 122221512}
|
||||
- {fileID: 383131410}
|
||||
Reference in new issue
Block a user