Platformer example started

This commit is contained in:
ThomasCharester committed 2026-02-22 13:59:04 +03:00
1 parent efcfaae647
commit 9f026b76d6
325 files changed
+23540 -270

No files matched your search

@@ -10,7 +10,8 @@ namespace Code.Infrastructure.Camera
public enum CameraMode
{
None,
ThirdPerson
ThirdPerson,
Platformer
}
[Config("Configs/Camera/CameraConfig")]
@@ -6,29 +6,11 @@ namespace Code.Infrastructure.Camera.CameraStates
// [State(typeof(CameraMode),typeof(CameraStateMachineContext))]
public abstract class BaseCameraState : BaseState<CameraMode, CameraStateMachineContext>
{
protected EventBus.EventBus _eventBus;
// Трансформ объекта, за которым следует камера
protected Transform FollowTransform;
protected EventBus.EventBus EventBus;
// Позиция следования: текущая сглаженная позиция и горизонтальное направление камеры
protected Vector3 CurrentFollowPosition;
// Целевой вертикальный угол камеры (наклон вверх/вниз)
protected float TargetVerticalAngle;
// Текущая и целевая дистанция камеры от цели
protected float CurrentDistance, TargetDistance;
// Исходные значения дистанции для восстановления
protected float OriginalDefaultDistance, OriginalMinDistance, OriginalMaxDistance;
// Горизонтальное направление камеры (проекция forward на плоскость)
protected Vector3 PlanarDirection { get; set; }
protected BaseCameraState(CameraStateMachineContext context, EventBus.EventBus eventBus) : base(context, eventBus)
{
_eventBus = eventBus;
EventBus = eventBus;
}
// Основной метод обновления камеры, вызываемый извне каждый кадр
@@ -1,4 +1,5 @@
using Code.Infrastructure.Generators;
using Code.Infrastructure.Loadings;
using UnityEngine;
namespace Code.Infrastructure.Camera.CameraStates
@@ -6,6 +7,7 @@ namespace Code.Infrastructure.Camera.CameraStates
[State(typeof(CameraMode),typeof(CameraStateMachineContext), true)]
public partial class NoneCameraState : BaseCameraState
{
private Loading _loading;
public NoneCameraState(CameraStateMachineContext context, EventBus.EventBus eventBus) : base(context, eventBus)
{
}