Health System
This commit is contained in:
1 parent
329cc98ade
commit
cb05da5e89
87 files changed
+568550
-155362
No files matched your search
@@ -102,6 +102,11 @@ MonoBehaviour:
|
||||
m_SerializedLabels:
|
||||
- AudioSourceSettings
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 4c37d16df5f3e36d38fa1d2eb7c777b6
|
||||
m_Address: Assets/OfficeGame/Battle/UI/EntityHealthBar.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 4e3a3d4719a2f78069f305917ba7a3d5
|
||||
m_Address: Assets/OfficeGame/Battle/UI/BattleActionDecision.asset
|
||||
m_ReadOnly: 0
|
||||
@@ -151,6 +156,12 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: c75fc594d5c3a9b588ca212e2e3eec23
|
||||
m_Address: Assets/OfficeGame/Battle/UI/EntityHealthBar.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- UIPanel
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d4879f0d37ee399febeaf69dd0668743
|
||||
m_Address: Assets/OfficeGame/Testing/Testing.asset
|
||||
m_ReadOnly: 0
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using Code.Game.Gameplay.Player;
|
||||
using Code.OfficeGame.BattleMode.Actions;
|
||||
using KinematicCharacterController;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -103,8 +103,9 @@ namespace Code.OfficeGame.BattleMode.Actions.Attacks
|
||||
|
||||
private void OnEnemyHit(Collider attacker, Collider enemyCollider)
|
||||
{
|
||||
var originEntityId = enemyCollider.GetComponentInParent<EntityProperties>().GetEntityId();
|
||||
|
||||
var defenderId = enemyCollider.GetComponentInParent<EntityProperties>().GetEntityId();
|
||||
var attackerId = attacker.GetComponentInParent<EntityProperties>().GetEntityId();
|
||||
|
||||
Vector3 attackerDirection = attacker.transform.TransformDirection(_attackData.LocalKnockbackDirection);
|
||||
attackerDirection.y = 0f;
|
||||
attackerDirection.Normalize();
|
||||
@@ -119,7 +120,16 @@ namespace Code.OfficeGame.BattleMode.Actions.Attacks
|
||||
};
|
||||
var decisionResult = new AsIsBattleActionDeciderResult { ActionType = BattleActionType.Stugger };
|
||||
|
||||
battleTimeline.ForceDecideAction(originEntityId, actionData, decisionResult);
|
||||
EntityAttackedData attackedData = new()
|
||||
{
|
||||
ForcedActionData = actionData,
|
||||
ForcedDecisionResult = decisionResult,
|
||||
Damage = _attackData.Damage
|
||||
};
|
||||
|
||||
battleTimeline.AttackRequest(attackerId, defenderId, attackedData);
|
||||
|
||||
//battleTimeline.ForceDecideAction(originEntityId, actionData, decisionResult);
|
||||
|
||||
_particleService.EmitOneShot(
|
||||
new ParticlePartitionIDPair(ParticlePartition.HitParticles, 0),
|
||||
|
||||
@@ -74,6 +74,15 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
stuggerActionData.KnockbackSpeed * tickDelta,
|
||||
stuggerActionData.KnockbackDistance);
|
||||
|
||||
// Поворот противоположно направлению атаки за время отталкивания
|
||||
Quaternion targetRotation = Quaternion.LookRotation(-stuggerActionData.KnockbackDirection, Vector3.up);
|
||||
float t = stepDistance / stuggerActionData.KnockbackDistance;
|
||||
Quaternion nextRotation = Quaternion.Slerp(
|
||||
entity.KinematicCharacterMotor.TransientRotation,
|
||||
targetRotation,
|
||||
t);
|
||||
entity.KinematicCharacterMotor.SetRotation(nextRotation);
|
||||
|
||||
stuggerActionData.KnockbackDistance -= stepDistance;
|
||||
|
||||
Vector3 step = stuggerActionData.KnockbackDirection * stepDistance;
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using Code.Game.Gameplay.Player;
|
||||
using Code.OfficeGame.BattleMode.Effects;
|
||||
using Code.OfficeGame.BattleMode.Health;
|
||||
using Code.OfficeGame.BattleMode.HitBoxes;
|
||||
using KinematicCharacterController;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions
|
||||
@@ -14,5 +18,10 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
public KinematicCharacterMotor KinematicCharacterMotor;
|
||||
public EntityHitBoxes EntityHitBoxes;
|
||||
public EntityPreviewVisuals EntityPreviewVisuals;
|
||||
|
||||
public EntityHealth EntityHealth;
|
||||
|
||||
[DoNotSerialize]
|
||||
public List<Effect> Effects = new();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Code.Game.Gameplay.Player;
|
||||
using Code.OfficeGame.BattleMode.Health;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Actions
|
||||
@@ -11,6 +12,7 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
|
||||
public AnimatorSnapshot AnimatorSnapshot;
|
||||
public MovementControllerSnapshot ControllerSnapshot;
|
||||
public EntityHealthSnapshot HealthSnapshot;
|
||||
|
||||
public static EntitySnapshot GetSnapshot(EntityProperties entityProperties)
|
||||
{
|
||||
@@ -20,12 +22,15 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
Position = entityProperties.KinematicCharacterMotor.TransientPosition,
|
||||
Rotation = entityProperties.KinematicCharacterMotor.TransientRotation,
|
||||
AnimatorSnapshot = AnimatorSnapshot.GetSnapshot(entityProperties.animator),
|
||||
ControllerSnapshot = MovementControllerSnapshot.GetSnapshot(entityProperties.MovementController)
|
||||
ControllerSnapshot = MovementControllerSnapshot.GetSnapshot(entityProperties.MovementController),
|
||||
HealthSnapshot = EntityHealthSnapshot.GetSnapshot(entityProperties.EntityHealth)
|
||||
};
|
||||
}
|
||||
|
||||
public static void RestoreSnapshot(EntityProperties entityProperties, EntitySnapshot snapshot)
|
||||
{
|
||||
snapshot.HealthSnapshot.RestoreSnapshot(entityProperties.EntityHealth);
|
||||
|
||||
// 1. Возвращаем капсулу KCC
|
||||
entityProperties.KinematicCharacterMotor.SetPositionAndRotation(snapshot.Position, snapshot.Rotation);
|
||||
entityProperties.KinematicCharacterMotor.BaseVelocity = snapshot.BaseVelocity;
|
||||
@@ -93,6 +98,8 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
NormalizedTime = stateInfo.normalizedTime,
|
||||
LayerWeight = animator.GetLayerWeight(i)
|
||||
};
|
||||
|
||||
Debug.Log($"Saved animator state {stateInfo.shortNameHash}");
|
||||
}
|
||||
|
||||
int paramCount = animator.parameterCount;
|
||||
@@ -199,4 +206,22 @@ namespace Code.OfficeGame.BattleMode.Actions
|
||||
movementController.LookInputVector = LookInput;
|
||||
}
|
||||
}
|
||||
|
||||
public struct EntityHealthSnapshot
|
||||
{
|
||||
public HealthData HealthData;
|
||||
|
||||
public static EntityHealthSnapshot GetSnapshot(EntityHealth entityHealth)
|
||||
{
|
||||
return new()
|
||||
{
|
||||
HealthData = entityHealth.HealthData.CurrentValue
|
||||
};
|
||||
}
|
||||
|
||||
public void RestoreSnapshot(EntityHealth entityHealth)
|
||||
{
|
||||
entityHealth.SetHealthData(HealthData);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ using Code.OfficeGame.BattleMode.Actions;
|
||||
using Code.OfficeGame.BattleMode.Actions.Attacks;
|
||||
using Code.OfficeGame.BattleMode.Actions.Deciders;
|
||||
using Code.OfficeGame.BattleMode.Actions.Player;
|
||||
using Code.OfficeGame.BattleMode.Health;
|
||||
using Code.OfficeGame.BattleMode.Marker;
|
||||
using Code.OfficeGame.BattleMode.Timeline;
|
||||
using Code.OfficeGame.BattleMode.UI;
|
||||
@@ -91,6 +92,10 @@ namespace Code.Game.OfficeGame.GameStates
|
||||
BattleTimelinePanel battleTimelinePanel =
|
||||
(BattleTimelinePanel)await Context.UIFactory
|
||||
.LoadPanel(UIPanelType.BattleTimeline, false);
|
||||
|
||||
var healthBarHolder = new HealthPanelsHolder();
|
||||
|
||||
await healthBarHolder.SpawnHealthBars(Context.UIFactory, entities);
|
||||
|
||||
void InstallExtra(Scene scene, ContainerBuilder builder)
|
||||
{
|
||||
@@ -104,6 +109,8 @@ namespace Code.Game.OfficeGame.GameStates
|
||||
builder.RegisterValue(battleActionDecisionPanel);
|
||||
builder.RegisterValue(battleTimelinePanel);
|
||||
|
||||
builder.RegisterValue(healthBarHolder);
|
||||
|
||||
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(BattleActionNone), new[]{ typeof(BattleAction) }, Lifetime.Singleton, Resolution.Eager);
|
||||
@@ -129,6 +136,10 @@ namespace Code.Game.OfficeGame.GameStates
|
||||
|
||||
container = Context.SceneContainerManager.ScenesContainers[SceneId.Battle];
|
||||
|
||||
GameObjectInjector
|
||||
.InjectRecursiveMany(
|
||||
healthBarHolder.PanelList.Select(x => x.gameObject).ToList(), container);
|
||||
|
||||
///// T
|
||||
GameObjectInjector
|
||||
.InjectRecursiveMany(
|
||||
@@ -162,8 +173,7 @@ namespace Code.Game.OfficeGame.GameStates
|
||||
var player = container.Resolve<EntityProperties>();
|
||||
|
||||
entities.Remove(player);
|
||||
entities.Add(player);
|
||||
entities.Reverse();
|
||||
entities.Insert(0,player);
|
||||
|
||||
_battleTimeline?.RunBattleLoopAsync(entities, _battleTokenSource.Token).Forget();
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ce03700147964a0db8f653fa405a7d60
|
||||
timeCreated: 1794908165
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Code.OfficeGame.BattleMode.Effects
|
||||
{
|
||||
public abstract class AttackEffect : Effect
|
||||
{
|
||||
public override EffectType Type => EffectType.Attack;
|
||||
|
||||
public abstract void Apply(in int damage);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3c79610673054e9581c567f2081e6e61
|
||||
timeCreated: 1794908752
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Code.OfficeGame.BattleMode.Effects
|
||||
{
|
||||
public abstract class DefenseEffect : Effect
|
||||
{
|
||||
public override EffectType Type => EffectType.Defense;
|
||||
|
||||
public abstract void Apply(in int damage);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 132a126a84724b3db4f97a0d92f06391
|
||||
timeCreated: 1794908824
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Code.OfficeGame.BattleMode.Effects
|
||||
{
|
||||
public abstract class Effect
|
||||
{
|
||||
public abstract EffectType Type { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ed8c557058f438d80c8770ee426a6ec
|
||||
timeCreated: 1794908460
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Code.OfficeGame.BattleMode.Effects
|
||||
{
|
||||
public enum EffectType
|
||||
{
|
||||
Attack,
|
||||
Defense
|
||||
// , Action
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ee15bd2f5ef14b3bbc6445bc9bdef60a
|
||||
timeCreated: 1794908476
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using Code.OfficeGame.BattleMode.Actions;
|
||||
using Code.OfficeGame.BattleMode.HitBoxes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode
|
||||
{
|
||||
public struct EntityAttackedData : IEquatable<EntityAttackedData>
|
||||
{
|
||||
public int Damage;
|
||||
public HitBoxPartType HitBoxPartType;
|
||||
|
||||
public EntityId AttackerId;
|
||||
public EntityId DefenderId;
|
||||
|
||||
public EntityProperties Attacker;
|
||||
public EntityProperties Defender;
|
||||
|
||||
public BattleActionData ForcedActionData;
|
||||
public BattleActionDecisionResult ForcedDecisionResult;
|
||||
|
||||
public bool Equals(EntityAttackedData other)
|
||||
{
|
||||
return AttackerId == other.AttackerId && DefenderId == other.DefenderId && HitBoxPartType == other.HitBoxPartType;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine(AttackerId, DefenderId, HitBoxPartType);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c4f61ee032bb4222912ae52116769cec
|
||||
timeCreated: 1794909667
|
||||
@@ -8,21 +8,20 @@ namespace Code.OfficeGame.BattleMode.Health
|
||||
{
|
||||
public class EntityHealth : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private int maxHealth;
|
||||
[SerializeField] private int currentHealth;
|
||||
|
||||
public ReactiveProperty<int> _maxHealth;
|
||||
public ReactiveProperty<int> _currentHealth;
|
||||
[SerializeField] private HealthData healthData;
|
||||
|
||||
public ReadOnlyReactiveProperty<int> MaxHealth => _maxHealth;
|
||||
public ReadOnlyReactiveProperty<int> CurrentHealth => _currentHealth;
|
||||
private ReactiveProperty<HealthData> _healthData;
|
||||
|
||||
public ReadOnlyReactiveProperty<HealthData> HealthData => _healthData;
|
||||
|
||||
public bool IsDead => _healthData.CurrentValue.CurrentHealth <= 0;
|
||||
|
||||
[SerializeField]
|
||||
public Dictionary<HitBoxPartType, int> hitBoxPartModifier = new();
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_maxHealth = new ReactiveProperty<int>(maxHealth);
|
||||
_currentHealth = new ReactiveProperty<int>(currentHealth);
|
||||
_healthData = new ReactiveProperty<HealthData>(healthData);
|
||||
}
|
||||
|
||||
public virtual void GetDamage(int damage, HitBoxPartType hitBoxPart)
|
||||
@@ -32,15 +31,42 @@ namespace Code.OfficeGame.BattleMode.Health
|
||||
GetHeal(-damage);
|
||||
return;
|
||||
}
|
||||
_currentHealth.Value -= damage * hitBoxPartModifier[hitBoxPart];
|
||||
|
||||
var newCurrentHealth = _healthData.CurrentValue.CurrentHealth - damage * hitBoxPartModifier[hitBoxPart];
|
||||
|
||||
_healthData.Value = new HealthData()
|
||||
{
|
||||
MaxHealth = _healthData.CurrentValue.MaxHealth,
|
||||
CurrentHealth = newCurrentHealth
|
||||
};
|
||||
|
||||
Debug.Log($"{GetEntityId()} got {damage} damage in {hitBoxPart} and have {newCurrentHealth} health");
|
||||
}
|
||||
|
||||
public virtual void GetHeal(int heal)
|
||||
{
|
||||
if (heal < 0) return;
|
||||
|
||||
_currentHealth.Value += heal;
|
||||
var newCurrentHealth = _healthData.CurrentValue.CurrentHealth + heal;
|
||||
|
||||
_healthData.Value = new HealthData()
|
||||
{
|
||||
MaxHealth = _healthData.CurrentValue.MaxHealth,
|
||||
CurrentHealth = newCurrentHealth
|
||||
};
|
||||
}
|
||||
|
||||
public virtual void SetHealthData(HealthData newHealthData)
|
||||
{
|
||||
_healthData.Value = newHealthData;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct HealthData
|
||||
{
|
||||
public int MaxHealth;
|
||||
public int CurrentHealth;
|
||||
}
|
||||
|
||||
/// Социальные метрики
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.UI;
|
||||
using Code.OfficeGame.BattleMode.Actions;
|
||||
using Code.OfficeGame.BattleMode.Health.UI;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Reflex.Attributes;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Health
|
||||
{
|
||||
public class HealthPanelsHolder : IDisposable
|
||||
{
|
||||
public List<EntityHealthPanel> PanelList;
|
||||
|
||||
[Inject]
|
||||
private void Construct(CameraStateMachine cameraStateMachine)
|
||||
{
|
||||
foreach (var panel in PanelList) panel.Construct(cameraStateMachine);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Список опрокинуть в контейнер
|
||||
/// </summary>
|
||||
/// <param name="factory"></param>
|
||||
/// <param name="entities"></param>
|
||||
/// <returns></returns>
|
||||
public async UniTask SpawnHealthBars(
|
||||
IUIFactory factory,
|
||||
List<EntityProperties> entities)
|
||||
{
|
||||
PanelList = new List<EntityHealthPanel>();
|
||||
|
||||
foreach (var entity in entities)
|
||||
{
|
||||
var healthBarTarget = entity.GetComponentInChildren<HealthBarTarget>();
|
||||
|
||||
if(!healthBarTarget) continue;
|
||||
|
||||
var panel = (EntityHealthPanel) await factory.LoadPanel(UIPanelType.EntityHealthBar, false);
|
||||
|
||||
panel.SetTarget(healthBarTarget.transform);
|
||||
|
||||
panel.SubscribeHealthPanel(entity.EntityHealth);
|
||||
|
||||
PanelList.Add(panel);
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
foreach (var panel in PanelList)
|
||||
panel.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e6246babc37464a867f371c1df5f395
|
||||
timeCreated: 1794926045
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 285e4ad050214d57bd139507b18394e3
|
||||
timeCreated: 1794920071
|
||||
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.UI;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using R3;
|
||||
using Reflex.Attributes;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Health.UI
|
||||
{
|
||||
public class EntityHealthPanel : UIPanel
|
||||
{
|
||||
[SerializeField] private TMP_Text healthText;
|
||||
[SerializeField] private Image healthBar;
|
||||
|
||||
[SerializeField] private Color criticalColor;
|
||||
[SerializeField] private Color fullColor;
|
||||
[SerializeField] private Color deadColor;
|
||||
|
||||
[SerializeField]
|
||||
[Range(0.1f,0.9f)]
|
||||
private float criticalPercent;
|
||||
|
||||
private DisposableBag _healthSubscriptions;
|
||||
private Camera _camera;
|
||||
private Transform _target;
|
||||
|
||||
[Inject]
|
||||
public void Construct(CameraStateMachine cameraStateMachine)
|
||||
{
|
||||
_camera = cameraStateMachine.Camera;
|
||||
}
|
||||
|
||||
private void LateUpdate()
|
||||
{
|
||||
if (!_target || !_camera) return;
|
||||
|
||||
Vector3 screenPos = _camera.WorldToScreenPoint(_target.position);
|
||||
|
||||
bool isVisible = screenPos.z > 0;
|
||||
if (gameObject.activeSelf != isVisible)
|
||||
gameObject.SetActive(isVisible);
|
||||
|
||||
if (isVisible)
|
||||
transform.position = screenPos;
|
||||
}
|
||||
|
||||
public void SetTarget(Transform target)
|
||||
{
|
||||
_target = target;
|
||||
}
|
||||
|
||||
public void SubscribeHealthPanel(EntityHealth entityHealth)
|
||||
{
|
||||
entityHealth.HealthData
|
||||
.Subscribe(SetHealthStatus)
|
||||
.AddTo(ref _healthSubscriptions);
|
||||
}
|
||||
|
||||
private void SetHealthStatus(HealthData healthData)
|
||||
{
|
||||
if (healthData.CurrentHealth <= 0)
|
||||
{
|
||||
healthText.color = deadColor;
|
||||
healthText.SetText("Dead");
|
||||
healthBar.fillAmount = 1;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
float healthPercentage = (float)healthData.CurrentHealth / healthData.MaxHealth;
|
||||
|
||||
healthBar.fillAmount = healthPercentage;
|
||||
|
||||
// SB
|
||||
|
||||
healthText.SetText($"{healthData.CurrentHealth}/{healthData.MaxHealth}");
|
||||
|
||||
if (healthPercentage <= criticalPercent)
|
||||
healthBar.color = criticalColor;
|
||||
else
|
||||
healthBar.color = fullColor;
|
||||
}
|
||||
|
||||
public override UniTask Open(CancellationToken cts = default)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
return UniTask.CompletedTask;
|
||||
}
|
||||
|
||||
public override UniTask Close(CancellationToken cts = default)
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
return UniTask.CompletedTask;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
_healthSubscriptions.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4bfc885db5af44af89786ce14877955e
|
||||
timeCreated: 1794920269
|
||||
@@ -0,0 +1,7 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.Health.UI
|
||||
{
|
||||
public class HealthBarTarget : MonoBehaviour
|
||||
{ }
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9cf2c0132634b5591ef2553223721ca
|
||||
timeCreated: 1794923322
|
||||
@@ -7,6 +7,7 @@ using Code.Game.OfficeGame.BattleMode;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.OfficeGame.BattleMode.Actions;
|
||||
using Code.OfficeGame.BattleMode.Actions.Deciders;
|
||||
using Code.OfficeGame.BattleMode.Effects;
|
||||
using Code.OfficeGame.BattleMode.Snapshots;
|
||||
using Code.OfficeGame.BattleMode.UI;
|
||||
using Cysharp.Threading.Tasks;
|
||||
@@ -40,6 +41,9 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
|
||||
private SemaphoreSlim _preview = new(1,1);
|
||||
|
||||
// Entity, damage
|
||||
private List<EntityAttackedData> _attackRequests = new();
|
||||
|
||||
public BattleTimeline(
|
||||
BattleTimelinePanel timelinePanel,
|
||||
IEnumerable<BattleAction> battleActions,
|
||||
@@ -318,8 +322,11 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
Physics.Simulate(TickDelta);
|
||||
Physics.SyncTransforms();
|
||||
|
||||
ProcessAttackRequests();
|
||||
|
||||
var readyEntities = _battleActionDatas
|
||||
.Where(x => x.Value.Finished)
|
||||
.Where(x=> !inEntities[x.Key].EntityHealth.IsDead)
|
||||
.Select(x => x.Key)
|
||||
.ToArray();
|
||||
|
||||
@@ -433,23 +440,98 @@ namespace Code.OfficeGame.BattleMode.Timeline
|
||||
return (decisionResult, actionData);
|
||||
}
|
||||
|
||||
public void ForceDecideAction(
|
||||
EntityId entityId,
|
||||
BattleActionData forcedBattleActionData,
|
||||
BattleActionDecisionResult forcedBattleActionDataResult)
|
||||
{
|
||||
if(_battleActionDatas.TryGetValue(entityId, out var battleActionData)
|
||||
&& _actionDecisionResults.TryGetValue(entityId, out var actionDecisionResult))
|
||||
_battleActions[_actionDecisionResults[entityId].ActionType]
|
||||
.Finish(
|
||||
_entities[entityId],
|
||||
battleActionData,
|
||||
actionDecisionResult);
|
||||
|
||||
_battleActionDatas[entityId] = forcedBattleActionData;
|
||||
_actionDecisionResults[entityId] = forcedBattleActionDataResult;
|
||||
// public void ForceDecideAction(
|
||||
// EntityId entityId,
|
||||
// BattleActionData forcedBattleActionData,
|
||||
// BattleActionDecisionResult forcedBattleActionDataResult)
|
||||
// {
|
||||
// if(_battleActionDatas.TryGetValue(entityId, out var battleActionData)
|
||||
// && _actionDecisionResults.TryGetValue(entityId, out var actionDecisionResult))
|
||||
// _battleActions[_actionDecisionResults[entityId].ActionType]
|
||||
// .Finish(
|
||||
// _entities[entityId],
|
||||
// battleActionData,
|
||||
// actionDecisionResult);
|
||||
//
|
||||
// _battleActionDatas[entityId] = forcedBattleActionData;
|
||||
// _actionDecisionResults[entityId] = forcedBattleActionDataResult;
|
||||
//
|
||||
// Debug.Log($"Задано действие {forcedBattleActionDataResult.ActionType} для {entityId} with {forcedBattleActionData.GetType()}");
|
||||
// }
|
||||
|
||||
Debug.Log($"Задано действие {forcedBattleActionDataResult.ActionType} для {entityId} with {forcedBattleActionData.GetType()}");
|
||||
private void ProcessAttackRequests()
|
||||
{
|
||||
foreach (var request in _attackRequests)
|
||||
{
|
||||
var attacker = request.Attacker;
|
||||
var defender = request.Defender;
|
||||
|
||||
var attackEffects = attacker.Effects.Where(x => x.Type == EffectType.Attack)
|
||||
.Select(x => (AttackEffect)x);
|
||||
|
||||
var damage = request.Damage;
|
||||
|
||||
foreach (var effect in attackEffects)
|
||||
{
|
||||
effect.Apply(damage);
|
||||
}
|
||||
|
||||
var defendEffects = defender.Effects.Where(x => x.Type == EffectType.Defense)
|
||||
.Select(x => (DefenseEffect)x);
|
||||
|
||||
foreach (var effect in defendEffects)
|
||||
{
|
||||
effect.Apply(damage);
|
||||
}
|
||||
|
||||
defender.EntityHealth.GetDamage(damage, request.HitBoxPartType);
|
||||
|
||||
var defenderId = request.DefenderId;
|
||||
|
||||
if (_battleActionDatas.TryGetValue(defenderId, out var battleActionData)
|
||||
&& _actionDecisionResults.TryGetValue(defenderId, out var actionDecisionResult))
|
||||
_battleActions[_actionDecisionResults[defenderId].ActionType]
|
||||
.Finish(
|
||||
_entities[defenderId],
|
||||
battleActionData,
|
||||
actionDecisionResult);
|
||||
|
||||
Debug.Log($"{defender} got {damage} and {defender.EntityHealth.IsDead}");
|
||||
|
||||
if (defender.EntityHealth.IsDead)
|
||||
{
|
||||
var forcedDeathData = new NoneBattleActionData();
|
||||
var forcedDeathDecision = new AsIsBattleActionDeciderResult();
|
||||
|
||||
_battleActionDatas[defenderId] = forcedDeathData;
|
||||
_actionDecisionResults[defenderId] = forcedDeathDecision;
|
||||
}
|
||||
else
|
||||
{
|
||||
_battleActionDatas[defenderId] = request.ForcedActionData;
|
||||
_actionDecisionResults[defenderId] = request.ForcedDecisionResult;
|
||||
}
|
||||
}
|
||||
|
||||
_attackRequests.Clear();
|
||||
}
|
||||
|
||||
public void AttackRequest(EntityId attacker, EntityId defender, EntityAttackedData attackedData)
|
||||
{
|
||||
if (_attackRequests.Contains(attackedData)) return;
|
||||
|
||||
attackedData.AttackerId = attacker;
|
||||
attackedData.DefenderId = defender;
|
||||
|
||||
attackedData.Attacker = _entities[attacker];
|
||||
attackedData.Defender = _entities[defender];
|
||||
|
||||
_attackRequests.Add(attackedData);
|
||||
}
|
||||
|
||||
public void KillEntity(EntityId entityId)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ namespace Code.Infrastructure.UI
|
||||
{
|
||||
BattleActionDecision,
|
||||
BattleTimeline,
|
||||
MusicMinigame
|
||||
MusicMinigame,
|
||||
EntityHealthBar
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ MonoBehaviour:
|
||||
HitboxEndFrame: 60
|
||||
AttackingBodyPart: 12
|
||||
StuggerFrames: 270
|
||||
Damage: 5
|
||||
Damage: 1
|
||||
KnockbackSpeed: 3
|
||||
KnockbackDistance: 0.5
|
||||
LocalKnockbackDirection: {x: 1, y: 0, z: 0}
|
||||
@@ -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: 263960ff516f55c6686b3c63c7a6a28e, type: 3}
|
||||
m_Name: EntityHealthBar
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Infrastructure.UI.UIPanelSettings
|
||||
Prefab:
|
||||
m_AssetGUID: 4c37d16df5f3e36d38fa1d2eb7c777b6
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
UIPanelType: 3
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c75fc594d5c3a9b588ca212e2e3eec23
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,270 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &5612670767920243168
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8963393221385055825}
|
||||
- component: {fileID: 7130912852184395562}
|
||||
- component: {fileID: 7527782372204337943}
|
||||
m_Layer: 5
|
||||
m_Name: Timeline
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8963393221385055825
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5612670767920243168}
|
||||
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: 8426637362296163613}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7130912852184395562
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5612670767920243168}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7527782372204337943
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5612670767920243168}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.075834215, g: 1, b: 0, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 669a5e6f39262bf48840b4d387165243, type: 3}
|
||||
m_Type: 3
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 0
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &7813616833165240466
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4325401176884269711}
|
||||
- component: {fileID: 223223534000055126}
|
||||
- component: {fileID: 1356327144037885606}
|
||||
m_Layer: 5
|
||||
m_Name: HealthText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4325401176884269711
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7813616833165240466}
|
||||
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: 8426637362296163613}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &223223534000055126
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7813616833165240466}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1356327144037885606
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7813616833165240466}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 100/100
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 29.6
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 1
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 1
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656bu
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &8190722548431316705
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8426637362296163613}
|
||||
- component: {fileID: 8186688102566492818}
|
||||
m_Layer: 5
|
||||
m_Name: EntityHealthBar
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8426637362296163613
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8190722548431316705}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 8963393221385055825}
|
||||
- {fileID: 4325401176884269711}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 120, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &8186688102566492818
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8190722548431316705}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4bfc885db5af44af89786ce14877955e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.Health.UI.EntityHealthPanel
|
||||
healthText: {fileID: 1356327144037885606}
|
||||
healthBar: {fileID: 7527782372204337943}
|
||||
criticalColor: {r: 1, g: 0, b: 0, a: 1}
|
||||
fullColor: {r: 0.14772671, g: 1, b: 0, a: 1}
|
||||
deadColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
criticalPercent: 0.36
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4c37d16df5f3e36d38fa1d2eb7c777b6
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -485,6 +485,7 @@ GameObject:
|
||||
- component: {fileID: 7206607324510557172}
|
||||
- component: {fileID: 1229843420206488908}
|
||||
- component: {fileID: 763278329666219388}
|
||||
- component: {fileID: 1670091874095856659}
|
||||
m_Layer: 3
|
||||
m_Name: Companion
|
||||
m_TagString: Untagged
|
||||
@@ -506,6 +507,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 4049007249699777655}
|
||||
- {fileID: 1582033057324926883}
|
||||
- {fileID: 5593362814798891677}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -646,6 +648,7 @@ MonoBehaviour:
|
||||
KinematicCharacterMotor: {fileID: 1099954219580652693}
|
||||
EntityHitBoxes: {fileID: 763278329666219388}
|
||||
EntityPreviewVisuals: {fileID: 1229843420206488908}
|
||||
EntityHealth: {fileID: 1670091874095856659}
|
||||
--- !u!114 &1229843420206488908
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -703,6 +706,50 @@ MonoBehaviour:
|
||||
value: {fileID: 7618776740632413465}
|
||||
- key: 13
|
||||
value: {fileID: 828702787897710607}
|
||||
--- !u!114 &1670091874095856659
|
||||
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: 92f98a212bd547ef8a5b83e66fb879dd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.Health.EntityHealth
|
||||
healthData:
|
||||
MaxHealth: 20
|
||||
CurrentHealth: 20
|
||||
hitBoxPartModifier:
|
||||
- key: 0
|
||||
value: 2
|
||||
- key: 1
|
||||
value: 1
|
||||
- key: 2
|
||||
value: 1
|
||||
- key: 3
|
||||
value: 1
|
||||
- key: 4
|
||||
value: 1
|
||||
- key: 5
|
||||
value: 1
|
||||
- key: 6
|
||||
value: 1
|
||||
- key: 7
|
||||
value: 1
|
||||
- key: 8
|
||||
value: 1
|
||||
- key: 9
|
||||
value: 1
|
||||
- key: 10
|
||||
value: 1
|
||||
- key: 11
|
||||
value: 1
|
||||
- key: 12
|
||||
value: 1
|
||||
- key: 13
|
||||
value: 1
|
||||
--- !u!1 &4999618383784345993
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -809,6 +856,50 @@ BoxCollider:
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &7081548100396443372
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1582033057324926883}
|
||||
- component: {fileID: 6045400971443095345}
|
||||
m_Layer: 0
|
||||
m_Name: HealthBarTarget
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1582033057324926883
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7081548100396443372}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 80.40001, y: 80.40001, z: 80.40001}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7181020033174296370}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &6045400971443095345
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7081548100396443372}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d9cf2c0132634b5591ef2553223721ca, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.Health.UI.HealthBarTarget
|
||||
--- !u!1 &7534648138589251582
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -512,6 +512,50 @@ BoxCollider:
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &3220228451196430878
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3123658300257014925}
|
||||
- component: {fileID: 7282940540516360292}
|
||||
m_Layer: 0
|
||||
m_Name: HealthBarTarget
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3123658300257014925
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3220228451196430878}
|
||||
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: 8374810763302122734}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &7282940540516360292
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3220228451196430878}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d9cf2c0132634b5591ef2553223721ca, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.Health.UI.HealthBarTarget
|
||||
--- !u!1 &3570747117625771719
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -901,6 +945,7 @@ GameObject:
|
||||
- component: {fileID: 4165226838920277257}
|
||||
- component: {fileID: 2770462520665863353}
|
||||
- component: {fileID: 2553546476431667818}
|
||||
- component: {fileID: 1468507354092524404}
|
||||
m_Layer: 3
|
||||
m_Name: Player
|
||||
m_TagString: Player
|
||||
@@ -1114,6 +1159,7 @@ MonoBehaviour:
|
||||
KinematicCharacterMotor: {fileID: 2650801570508942627}
|
||||
EntityHitBoxes: {fileID: 4165226838920277257}
|
||||
EntityPreviewVisuals: {fileID: 2553546476431667818}
|
||||
EntityHealth: {fileID: 1468507354092524404}
|
||||
--- !u!114 &2553546476431667818
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1130,6 +1176,50 @@ MonoBehaviour:
|
||||
activePreviewMaterial: {fileID: 2100000, guid: 8f8f5ef5288b9446cb7d2ad716dee3e6, type: 2}
|
||||
previewAlbedoTint: {r: 0.6, g: 0.85, b: 1, a: 1}
|
||||
previewRimColor: {r: 0, g: 1.5, b: 2, a: 1}
|
||||
--- !u!114 &1468507354092524404
|
||||
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: 92f98a212bd547ef8a5b83e66fb879dd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.OfficeGame.BattleMode.Health.EntityHealth
|
||||
healthData:
|
||||
MaxHealth: 20
|
||||
CurrentHealth: 20
|
||||
hitBoxPartModifier:
|
||||
- key: 0
|
||||
value: 2
|
||||
- key: 1
|
||||
value: 1
|
||||
- key: 2
|
||||
value: 1
|
||||
- key: 3
|
||||
value: 1
|
||||
- key: 4
|
||||
value: 1
|
||||
- key: 5
|
||||
value: 1
|
||||
- key: 6
|
||||
value: 1
|
||||
- key: 7
|
||||
value: 1
|
||||
- key: 8
|
||||
value: 1
|
||||
- key: 9
|
||||
value: 1
|
||||
- key: 10
|
||||
value: 1
|
||||
- key: 11
|
||||
value: 1
|
||||
- key: 12
|
||||
value: 1
|
||||
- key: 13
|
||||
value: 1
|
||||
--- !u!1001 &8337279434272854789
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1237,6 +1327,9 @@ PrefabInstance:
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects:
|
||||
- targetCorrespondingSourceObject: {fileID: -8679921383154817045, guid: 22f5406d0dd3e496dab66400ad658fb8, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 3123658300257014925}
|
||||
- targetCorrespondingSourceObject: {fileID: -9000482945971038761, guid: 22f5406d0dd3e496dab66400ad658fb8, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 5096828741742199434}
|
||||
|
||||
Reference in new issue
Block a user