mirror of
https://github.com/Bragin-Stepan/project-entity.git
synced 2026-03-02 14:29:23 +00:00
update
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Assets._Project.Develop.Runtime.Utilities.SceneManagement
|
||||
public static class Entity
|
||||
{
|
||||
public const string TestEntity = "Entities/TestEntity";
|
||||
public const string Ghost = "Entities/TestEntity";
|
||||
public const string Ghost = "Entities/Ghost";
|
||||
}
|
||||
|
||||
private static readonly Dictionary<Type, string> _scriptableObject = new()
|
||||
|
||||
@@ -3,7 +3,8 @@ using System.Collections.Generic;
|
||||
using _Project.Develop.Runtime.Logic.Meta.Features.Wallet;
|
||||
using _Project.Develop.Runtime.UI;
|
||||
using _Project.Develop.Runtime.UI.Core;
|
||||
using _Project.Develop.Runtime.Utilities.InputManagement;
|
||||
using _Project.Develop.Runtime.Utils.InputManagement;
|
||||
using _Project.Develop.Runtime.Utils.InputManagement.Inputs;
|
||||
using _Project.Develop.Runtime.Utils.ReactiveManagement;
|
||||
using Assets._Project.Develop.Runtime.Infrastructure.DI;
|
||||
using Assets._Project.Develop.Runtime.Meta.Features.Wallet;
|
||||
@@ -28,7 +29,9 @@ namespace Assets._Project.Develop.Runtime.Infrastructure.EntryPoint
|
||||
container.RegisterAsSingle(CreateSceneLoaderService);
|
||||
container.RegisterAsSingle(CreateSceneSwitcherService);
|
||||
|
||||
container.RegisterAsSingle<IPlayerInputService>(CreateDesktopPlayerInputService);
|
||||
container.RegisterAsSingle(CreateInputFactory);
|
||||
container.RegisterAsSingle<IPlayerInput>(CreatePlayerInput);
|
||||
container.RegisterAsSingle<IUIInput>(CreateUIInput);
|
||||
|
||||
container.RegisterAsSingle(CreateSaveLoadFactory);
|
||||
container.RegisterAsSingle<ISaveLoadService>(CreateSaveLoadService);
|
||||
@@ -55,17 +58,17 @@ namespace Assets._Project.Develop.Runtime.Infrastructure.EntryPoint
|
||||
c.Resolve<ILoadingScreen>(),
|
||||
c);
|
||||
|
||||
private static SceneLoaderService CreateSceneLoaderService(DIContainer c)
|
||||
=> new();
|
||||
private static SceneLoaderService CreateSceneLoaderService(DIContainer c) => new();
|
||||
|
||||
private static ResourcesAssetsLoader CreateResourcesAssetsLoader(DIContainer c)
|
||||
=> new();
|
||||
private static ResourcesAssetsLoader CreateResourcesAssetsLoader(DIContainer c) => new();
|
||||
|
||||
private static DesktopPlayerInputService CreateDesktopPlayerInputService(DIContainer c)
|
||||
=> new();
|
||||
private static InputFactory CreateInputFactory(DIContainer c) => new();
|
||||
|
||||
private static SaveLoadFactory CreateSaveLoadFactory(DIContainer c)
|
||||
=> new();
|
||||
private static PlayerInput CreatePlayerInput(DIContainer c) => c.Resolve<InputFactory>().CreatePlayerInput();
|
||||
|
||||
private static UIInput CreateUIInput(DIContainer c) => c.Resolve<InputFactory>().CreateUIInput();
|
||||
|
||||
private static SaveLoadFactory CreateSaveLoadFactory(DIContainer c) => new();
|
||||
|
||||
private static PlayerDataProvider CreatePlayerDataProvider(DIContainer c)
|
||||
=> new(c.Resolve<ISaveLoadService>(), c.Resolve<ConfigsProviderService>());
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using _Project.Develop.Runtime.Logic.Gameplay.Features.Movement;
|
||||
using _Project.Develop.Runtime.Utilities.InputManagement;
|
||||
using _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.Systems;
|
||||
using _Project.Develop.Runtime.Logic.Gameplay.Features.Movement;
|
||||
using _Project.Develop.Runtime.Utilities.Conditions;
|
||||
using _Project.Develop.Runtime.Utils.InputManagement;
|
||||
using _Project.Develop.Runtime.Utils.ReactiveManagement;
|
||||
using Assets._Project.Develop.Runtime.Infrastructure.DI;
|
||||
using Assets._Project.Develop.Runtime.Utilities.SceneManagement;
|
||||
@@ -11,13 +13,13 @@ namespace _Project.Develop.Runtime.Entities
|
||||
{
|
||||
private readonly EntitiesLifeContext _entitiesLifeContext;
|
||||
private readonly MonoEntitiesFactory _monoEntitiesFactory;
|
||||
private readonly IPlayerInputService _playerInput;
|
||||
private readonly IPlayerInput _playerInput;
|
||||
|
||||
public EntitiesFactory(DIContainer container)
|
||||
{
|
||||
_entitiesLifeContext = container.Resolve<EntitiesLifeContext>();
|
||||
_monoEntitiesFactory = container.Resolve<MonoEntitiesFactory>();
|
||||
_playerInput = container.Resolve<IPlayerInputService>();
|
||||
_playerInput = container.Resolve<IPlayerInput>();
|
||||
}
|
||||
|
||||
public Entity CreateGhostEntity(Vector3 position)
|
||||
@@ -25,18 +27,47 @@ namespace _Project.Develop.Runtime.Entities
|
||||
Entity entity = CreateEmpty();
|
||||
|
||||
_monoEntitiesFactory.Create(entity, position, PathToResources.Entity.Ghost);
|
||||
|
||||
|
||||
entity
|
||||
.AddMoveDirection()
|
||||
.AddRotateDirection()
|
||||
.AddMoveSpeed(new ReactiveVariable<float>(10))
|
||||
.AddRotationSpeed(new ReactiveVariable<float>(800));
|
||||
|
||||
.AddRotationSpeed(new ReactiveVariable<float>(800))
|
||||
.AddMaxHealth(new ReactiveVariable<float>(150))
|
||||
.AddCurrentHealth(new ReactiveVariable<float>(150))
|
||||
.AddIsDead()
|
||||
.AddIsMoving()
|
||||
.AddInDeathProcess()
|
||||
.AddDeathProcessInitialTime(new ReactiveVariable<float>(2))
|
||||
.AddDeathProcessCurrentTime();
|
||||
|
||||
ICompositeCondition canMove = new CompositeCondition()
|
||||
.Add(new FuncCondition(() => entity.IsDead.Value == false));
|
||||
|
||||
ICompositeCondition canRotate = new CompositeCondition()
|
||||
.Add(new FuncCondition(() => entity.IsDead.Value == false));
|
||||
|
||||
ICompositeCondition mustDie = new CompositeCondition()
|
||||
.Add(new FuncCondition(() => entity.CurrentHealth.Value <= 0));
|
||||
|
||||
ICompositeCondition mustSelfRelease = new CompositeCondition()
|
||||
.Add(new FuncCondition(() => entity.IsDead.Value))
|
||||
.Add(new FuncCondition(() => entity.InDeathProcess.Value == false));
|
||||
|
||||
entity
|
||||
.AddCanMove(canMove)
|
||||
.AddCanRotate(canRotate)
|
||||
.AddMustDie(mustDie)
|
||||
.AddMustSelfRelease(mustSelfRelease);
|
||||
|
||||
entity
|
||||
.AddSystem(new RigidbodyMovementSystem())
|
||||
.AddSystem(new RigidbodyRotationSystem())
|
||||
.AddSystem(new MoveDirectionByInputSystem(_playerInput))
|
||||
.AddSystem(new RotateDirectionByInputSystem(_playerInput));
|
||||
.AddSystem(new RotateDirectionByInputSystem(_playerInput))
|
||||
.AddSystem(new DeathSwitcherSystem())
|
||||
.AddSystem(new DeathProcessTimerSystem())
|
||||
.AddSystem(new SelfReleaseSystem(_entitiesLifeContext));
|
||||
|
||||
_entitiesLifeContext.Add(entity);
|
||||
|
||||
|
||||
@@ -78,6 +78,188 @@ namespace _Project.Develop.Runtime.Entities
|
||||
return AddComponent(new Assets._Project.Develop.Runtime.Gameplay.Common.NavMeshAgentComponent() {Value = value});
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.CurrentHealth CurrentHealthC => GetComponent<_Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.CurrentHealth>();
|
||||
|
||||
public _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> CurrentHealth => CurrentHealthC.Value;
|
||||
|
||||
public bool TryGetCurrentHealth(out _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> value)
|
||||
{
|
||||
bool result = TryGetComponent(out _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.CurrentHealth component);
|
||||
if(result)
|
||||
value = component.Value;
|
||||
else
|
||||
value = default(_Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single>);
|
||||
return result;
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddCurrentHealth()
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.CurrentHealth() { Value = new _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single>() });
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddCurrentHealth(_Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> value)
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.CurrentHealth() {Value = value});
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.MaxHealth MaxHealthC => GetComponent<_Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.MaxHealth>();
|
||||
|
||||
public _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> MaxHealth => MaxHealthC.Value;
|
||||
|
||||
public bool TryGetMaxHealth(out _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> value)
|
||||
{
|
||||
bool result = TryGetComponent(out _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.MaxHealth component);
|
||||
if(result)
|
||||
value = component.Value;
|
||||
else
|
||||
value = default(_Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single>);
|
||||
return result;
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddMaxHealth()
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.MaxHealth() { Value = new _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single>() });
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddMaxHealth(_Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> value)
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.MaxHealth() {Value = value});
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.IsDead IsDeadC => GetComponent<_Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.IsDead>();
|
||||
|
||||
public _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Boolean> IsDead => IsDeadC.Value;
|
||||
|
||||
public bool TryGetIsDead(out _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Boolean> value)
|
||||
{
|
||||
bool result = TryGetComponent(out _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.IsDead component);
|
||||
if(result)
|
||||
value = component.Value;
|
||||
else
|
||||
value = default(_Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Boolean>);
|
||||
return result;
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddIsDead()
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.IsDead() { Value = new _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Boolean>() });
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddIsDead(_Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Boolean> value)
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.IsDead() {Value = value});
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.MustDie MustDieC => GetComponent<_Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.MustDie>();
|
||||
|
||||
public _Project.Develop.Runtime.Utilities.Conditions.ICompositeCondition MustDie => MustDieC.Value;
|
||||
|
||||
public bool TryGetMustDie(out _Project.Develop.Runtime.Utilities.Conditions.ICompositeCondition value)
|
||||
{
|
||||
bool result = TryGetComponent(out _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.MustDie component);
|
||||
if(result)
|
||||
value = component.Value;
|
||||
else
|
||||
value = default(_Project.Develop.Runtime.Utilities.Conditions.ICompositeCondition);
|
||||
return result;
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddMustDie(_Project.Develop.Runtime.Utilities.Conditions.ICompositeCondition value)
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.MustDie() {Value = value});
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.MustSelfRelease MustSelfReleaseC => GetComponent<_Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.MustSelfRelease>();
|
||||
|
||||
public _Project.Develop.Runtime.Utilities.Conditions.ICompositeCondition MustSelfRelease => MustSelfReleaseC.Value;
|
||||
|
||||
public bool TryGetMustSelfRelease(out _Project.Develop.Runtime.Utilities.Conditions.ICompositeCondition value)
|
||||
{
|
||||
bool result = TryGetComponent(out _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.MustSelfRelease component);
|
||||
if(result)
|
||||
value = component.Value;
|
||||
else
|
||||
value = default(_Project.Develop.Runtime.Utilities.Conditions.ICompositeCondition);
|
||||
return result;
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddMustSelfRelease(_Project.Develop.Runtime.Utilities.Conditions.ICompositeCondition value)
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.MustSelfRelease() {Value = value});
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.DeathProcessInitialTime DeathProcessInitialTimeC => GetComponent<_Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.DeathProcessInitialTime>();
|
||||
|
||||
public _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> DeathProcessInitialTime => DeathProcessInitialTimeC.Value;
|
||||
|
||||
public bool TryGetDeathProcessInitialTime(out _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> value)
|
||||
{
|
||||
bool result = TryGetComponent(out _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.DeathProcessInitialTime component);
|
||||
if(result)
|
||||
value = component.Value;
|
||||
else
|
||||
value = default(_Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single>);
|
||||
return result;
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddDeathProcessInitialTime()
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.DeathProcessInitialTime() { Value = new _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single>() });
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddDeathProcessInitialTime(_Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> value)
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.DeathProcessInitialTime() {Value = value});
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.DeathProcessCurrentTime DeathProcessCurrentTimeC => GetComponent<_Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.DeathProcessCurrentTime>();
|
||||
|
||||
public _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> DeathProcessCurrentTime => DeathProcessCurrentTimeC.Value;
|
||||
|
||||
public bool TryGetDeathProcessCurrentTime(out _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> value)
|
||||
{
|
||||
bool result = TryGetComponent(out _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.DeathProcessCurrentTime component);
|
||||
if(result)
|
||||
value = component.Value;
|
||||
else
|
||||
value = default(_Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single>);
|
||||
return result;
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddDeathProcessCurrentTime()
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.DeathProcessCurrentTime() { Value = new _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single>() });
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddDeathProcessCurrentTime(_Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> value)
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.DeathProcessCurrentTime() {Value = value});
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.InDeathProcess InDeathProcessC => GetComponent<_Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.InDeathProcess>();
|
||||
|
||||
public _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Boolean> InDeathProcess => InDeathProcessC.Value;
|
||||
|
||||
public bool TryGetInDeathProcess(out _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Boolean> value)
|
||||
{
|
||||
bool result = TryGetComponent(out _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.InDeathProcess component);
|
||||
if(result)
|
||||
value = component.Value;
|
||||
else
|
||||
value = default(_Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Boolean>);
|
||||
return result;
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddInDeathProcess()
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.InDeathProcess() { Value = new _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Boolean>() });
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddInDeathProcess(_Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Boolean> value)
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.InDeathProcess() {Value = value});
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Logic.Gameplay.Features.Movement.MoveDirection MoveDirectionC => GetComponent<_Project.Develop.Runtime.Logic.Gameplay.Features.Movement.MoveDirection>();
|
||||
|
||||
public _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<UnityEngine.Vector3> MoveDirection => MoveDirectionC.Value;
|
||||
@@ -260,5 +442,24 @@ namespace _Project.Develop.Runtime.Entities
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Movement.JumpForce() {Value = value});
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Logic.Gameplay.Features.Movement.CanJump CanJumpC => GetComponent<_Project.Develop.Runtime.Logic.Gameplay.Features.Movement.CanJump>();
|
||||
|
||||
public _Project.Develop.Runtime.Utilities.Conditions.ICompositeCondition CanJump => CanJumpC.Value;
|
||||
|
||||
public bool TryGetCanJump(out _Project.Develop.Runtime.Utilities.Conditions.ICompositeCondition value)
|
||||
{
|
||||
bool result = TryGetComponent(out _Project.Develop.Runtime.Logic.Gameplay.Features.Movement.CanJump component);
|
||||
if(result)
|
||||
value = component.Value;
|
||||
else
|
||||
value = default(_Project.Develop.Runtime.Utilities.Conditions.ICompositeCondition);
|
||||
return result;
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddCanJump(_Project.Develop.Runtime.Utilities.Conditions.ICompositeCondition value)
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Movement.CanJump() {Value = value});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using _Project.Develop.Runtime.Entities;
|
||||
using _Project.Develop.Runtime.Utilities.InputManagement;
|
||||
using _Project.Develop.Runtime.Utils.InputManagement;
|
||||
using _Project.Develop.Runtime.Utils.ReactiveManagement;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -7,11 +7,11 @@ namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Movement
|
||||
{
|
||||
public class MoveDirectionByInputSystem : IInitializableSystem, IUpdatableSystem
|
||||
{
|
||||
private readonly IPlayerInputService _playerInput;
|
||||
private readonly IPlayerInput _playerInput;
|
||||
|
||||
private ReactiveVariable<Vector3> _moveDirection;
|
||||
|
||||
public MoveDirectionByInputSystem(IPlayerInputService playerInput)
|
||||
public MoveDirectionByInputSystem(IPlayerInput playerInput)
|
||||
{
|
||||
_playerInput = playerInput;
|
||||
}
|
||||
@@ -23,7 +23,7 @@ namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Movement
|
||||
|
||||
public void OnUpdate(float deltaTime)
|
||||
{
|
||||
_moveDirection.Value = new Vector3(_playerInput.Move.x, 0, _playerInput.Move.y);
|
||||
_moveDirection.Value = new Vector3(_playerInput.Move.Value.x, 0, _playerInput.Move.Value.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
using _Project.Develop.Runtime.Entities;
|
||||
using _Project.Develop.Runtime.Utilities.InputManagement;
|
||||
using _Project.Develop.Runtime.Utils.InputManagement;
|
||||
using _Project.Develop.Runtime.Utils.ReactiveManagement;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -7,11 +7,11 @@ namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Movement
|
||||
{
|
||||
public class RotateDirectionByInputSystem : IInitializableSystem, IUpdatableSystem
|
||||
{
|
||||
private readonly IPlayerInputService _playerInput;
|
||||
private readonly IPlayerInput _playerInput;
|
||||
|
||||
private ReactiveVariable<Vector3> _rotateDirection;
|
||||
|
||||
public RotateDirectionByInputSystem(IPlayerInputService playerInput)
|
||||
public RotateDirectionByInputSystem(IPlayerInput playerInput)
|
||||
{
|
||||
_playerInput = playerInput;
|
||||
}
|
||||
@@ -23,7 +23,7 @@ namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Movement
|
||||
|
||||
public void OnUpdate(float deltaTime)
|
||||
{
|
||||
_rotateDirection.Value = new Vector3(_playerInput.Move.x, 0, _playerInput.Move.y);
|
||||
_rotateDirection.Value = new Vector3(_playerInput.Move.Value.x, 0, _playerInput.Move.Value.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ddecf634646849baa49d1c66e91377eb
|
||||
timeCreated: 1771516009
|
||||
@@ -0,0 +1,17 @@
|
||||
using _Project.Develop.Runtime.Entities;
|
||||
using _Project.Develop.Runtime.Utilities.Conditions;
|
||||
using _Project.Develop.Runtime.Utils.ReactiveManagement;
|
||||
|
||||
namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime
|
||||
{
|
||||
public class CurrentHealth : IEntityComponent { public ReactiveVariable<float> Value; }
|
||||
public class MaxHealth : IEntityComponent { public ReactiveVariable<float> Value; }
|
||||
|
||||
public class IsDead : IEntityComponent { public ReactiveVariable<bool> Value; }
|
||||
public class MustDie : IEntityComponent { public ICompositeCondition Value; }
|
||||
public class MustSelfRelease : IEntityComponent { public ICompositeCondition Value; }
|
||||
|
||||
public class DeathProcessInitialTime : IEntityComponent { public ReactiveVariable<float> Value; }
|
||||
public class DeathProcessCurrentTime : IEntityComponent { public ReactiveVariable<float> Value; }
|
||||
public class InDeathProcess : IEntityComponent { public ReactiveVariable<bool> Value; }
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 82344af3543e4efabe4c37c4b0131ba0
|
||||
timeCreated: 1771516021
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2bf2c15d48004f91a40b388b0c0f747a
|
||||
timeCreated: 1771516038
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using _Project.Develop.Runtime.Entities;
|
||||
using _Project.Develop.Runtime.Utils.ReactiveManagement;
|
||||
|
||||
namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.Systems
|
||||
{
|
||||
public class DeathProcessTimerSystem : IInitializableSystem, IDisposableSystem, IUpdatableSystem
|
||||
{
|
||||
private ReactiveVariable<bool> _isDead;
|
||||
private ReactiveVariable<bool> _inDeathProcess;
|
||||
|
||||
private ReactiveVariable<float> _initialTime;
|
||||
private ReactiveVariable<float> _currentTime;
|
||||
|
||||
private IDisposable _isDeadChangedDisposable;
|
||||
|
||||
public void OnInit(Entity entity)
|
||||
{
|
||||
_isDead = entity.IsDead;
|
||||
_inDeathProcess = entity.InDeathProcess;
|
||||
|
||||
_initialTime = entity.DeathProcessInitialTime;
|
||||
_currentTime = entity.DeathProcessCurrentTime;
|
||||
|
||||
_isDeadChangedDisposable = _isDead.Subscribe(OnIsDeadChanged);
|
||||
}
|
||||
|
||||
public void OnUpdate(float deltaTime)
|
||||
{
|
||||
if (_inDeathProcess.Value == false)
|
||||
return;
|
||||
|
||||
_currentTime.Value -= deltaTime;
|
||||
|
||||
if (CooldownIsOver())
|
||||
_inDeathProcess.Value = false;
|
||||
}
|
||||
|
||||
public void OnDispose()
|
||||
{
|
||||
_isDeadChangedDisposable.Dispose();
|
||||
}
|
||||
|
||||
private void OnIsDeadChanged(bool arg1, bool isDead)
|
||||
{
|
||||
if (isDead)
|
||||
{
|
||||
_currentTime.Value = _initialTime.Value;
|
||||
_inDeathProcess.Value = true;
|
||||
}
|
||||
}
|
||||
|
||||
private bool CooldownIsOver() => _currentTime.Value <= 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 53e84735577342fda0ab4dc6a380d829
|
||||
timeCreated: 1771517031
|
||||
@@ -0,0 +1,27 @@
|
||||
using _Project.Develop.Runtime.Entities;
|
||||
using _Project.Develop.Runtime.Utilities.Conditions;
|
||||
using _Project.Develop.Runtime.Utils.ReactiveManagement;
|
||||
|
||||
namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.Systems
|
||||
{
|
||||
public class DeathSwitcherSystem : IInitializableSystem, IUpdatableSystem
|
||||
{
|
||||
private ReactiveVariable<bool> _isDead;
|
||||
private ICompositeCondition _mustDie;
|
||||
|
||||
public void OnInit(Entity entity)
|
||||
{
|
||||
_isDead = entity.IsDead;
|
||||
_mustDie = entity.MustDie;
|
||||
}
|
||||
|
||||
public void OnUpdate(float deltaTime)
|
||||
{
|
||||
if (_isDead.Value)
|
||||
return;
|
||||
|
||||
if(_mustDie.Evaluate())
|
||||
_isDead.Value = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2bf6fb2218944c58b52d37f7039b95ae
|
||||
timeCreated: 1771516295
|
||||
@@ -0,0 +1,31 @@
|
||||
using _Project.Develop.Runtime.Entities;
|
||||
using _Project.Develop.Runtime.Utilities.Conditions;
|
||||
|
||||
namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Lifetime.Systems
|
||||
{
|
||||
public class SelfReleaseSystem : IInitializableSystem, IUpdatableSystem
|
||||
{
|
||||
private readonly EntitiesLifeContext _entitiesLifeContext;
|
||||
|
||||
private Entity _entity;
|
||||
|
||||
private ICompositeCondition _mustSelfRelease;
|
||||
|
||||
public SelfReleaseSystem(EntitiesLifeContext entitiesLifeContext)
|
||||
{
|
||||
_entitiesLifeContext = entitiesLifeContext;
|
||||
}
|
||||
|
||||
public void OnInit(Entity entity)
|
||||
{
|
||||
_entity = entity;
|
||||
_mustSelfRelease = entity.MustSelfRelease;
|
||||
}
|
||||
|
||||
public void OnUpdate(float deltaTime)
|
||||
{
|
||||
if (_mustSelfRelease.Evaluate())
|
||||
_entitiesLifeContext.Release(_entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bbee24a3ed9e4e558158992dc929a348
|
||||
timeCreated: 1771516662
|
||||
@@ -15,5 +15,6 @@ namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Movement
|
||||
public class CanRotate : IEntityComponent { public ICompositeCondition Value; }
|
||||
|
||||
public class JumpForce : IEntityComponent { public ReactiveVariable<float> Value; }
|
||||
public class CanJump : IEntityComponent { public ICompositeCondition Value; }
|
||||
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using _Project.Develop.Runtime.Entities;
|
||||
using _Project.Develop.Runtime.Utilities.Conditions;
|
||||
using _Project.Develop.Runtime.Utils.ReactiveManagement;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -9,18 +10,30 @@ namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Movement
|
||||
private ReactiveVariable<Vector3> _moveDirection;
|
||||
private ReactiveVariable<float> _moveSpeed;
|
||||
private CharacterController _controller;
|
||||
|
||||
private ReactiveVariable<bool> _isMoving;
|
||||
|
||||
private ICompositeCondition _canMove;
|
||||
|
||||
public void OnInit(Entity entity)
|
||||
{
|
||||
_moveDirection = entity.MoveDirection;
|
||||
_moveSpeed = entity.MoveSpeed;
|
||||
_controller = entity.CharacterController;
|
||||
|
||||
_isMoving = entity.IsMoving;
|
||||
_canMove = entity.CanMove;
|
||||
}
|
||||
|
||||
public void OnUpdate(float deltaTime)
|
||||
{
|
||||
if (_canMove.Evaluate() == false)
|
||||
return;
|
||||
|
||||
Vector3 velocity = _moveDirection.Value.normalized * _moveSpeed.Value;
|
||||
|
||||
_isMoving.Value = velocity.magnitude > 0;
|
||||
|
||||
_controller.Move(velocity * deltaTime);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using _Project.Develop.Runtime.Entities;
|
||||
using _Project.Develop.Runtime.Utilities.Conditions;
|
||||
using _Project.Develop.Runtime.Utils.ReactiveManagement;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -8,15 +9,21 @@ namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Movement
|
||||
{
|
||||
private ReactiveVariable<float> _jumpForce;
|
||||
private Rigidbody _rigidbody;
|
||||
|
||||
private ICompositeCondition _canJump;
|
||||
|
||||
public void OnInit(Entity entity)
|
||||
{
|
||||
_jumpForce = entity.JumpForce;
|
||||
_rigidbody = entity.Rigidbody;
|
||||
_canJump = entity.CanJump;
|
||||
}
|
||||
|
||||
public void OnUpdate(float deltaTime)
|
||||
{
|
||||
if (_canJump.Evaluate() == false)
|
||||
return;
|
||||
|
||||
_rigidbody.AddForce(Vector3.up * _jumpForce.Value, ForceMode.Impulse);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using _Project.Develop.Runtime.Entities;
|
||||
using _Project.Develop.Runtime.Utilities.Conditions;
|
||||
using _Project.Develop.Runtime.Utils.ReactiveManagement;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -9,17 +10,32 @@ namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Movement
|
||||
private ReactiveVariable<Vector3> _moveDirection;
|
||||
private ReactiveVariable<float> _moveSpeed;
|
||||
private Rigidbody _rigidbody;
|
||||
|
||||
private ReactiveVariable<bool> _isMoving;
|
||||
|
||||
private ICompositeCondition _canMove;
|
||||
|
||||
public void OnInit(Entity entity)
|
||||
{
|
||||
_moveDirection = entity.MoveDirection;
|
||||
_moveSpeed = entity.MoveSpeed;
|
||||
_rigidbody = entity.Rigidbody;
|
||||
|
||||
_isMoving = entity.IsMoving;
|
||||
_canMove = entity.CanMove;
|
||||
}
|
||||
|
||||
public void OnUpdate(float deltaTime)
|
||||
{
|
||||
if (_canMove.Evaluate() == false)
|
||||
{
|
||||
_rigidbody.velocity = Vector3.zero;
|
||||
return;
|
||||
}
|
||||
|
||||
Vector3 velocity = _moveDirection.Value.normalized * _moveSpeed.Value;
|
||||
|
||||
_isMoving.Value = velocity.magnitude > 0;
|
||||
|
||||
_rigidbody.velocity = velocity;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using _Project.Develop.Runtime.Entities;
|
||||
using _Project.Develop.Runtime.Utilities.Conditions;
|
||||
using _Project.Develop.Runtime.Utils.ReactiveManagement;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -10,16 +11,26 @@ namespace _Project.Develop.Runtime.Logic.Gameplay.Features.Movement
|
||||
|
||||
private ReactiveVariable<float> _speed;
|
||||
private ReactiveVariable<Vector3> _direction;
|
||||
|
||||
private ICompositeCondition _canRotate;
|
||||
|
||||
public void OnInit(Entity entity)
|
||||
{
|
||||
_rigidbody = entity.Rigidbody;
|
||||
_speed = entity.RotationSpeed;
|
||||
_direction = entity.RotateDirection;
|
||||
|
||||
_canRotate = entity.CanRotate;
|
||||
|
||||
if (_direction.Value != Vector3.zero)
|
||||
_rigidbody.transform.rotation = Quaternion.LookRotation(_direction.Value.normalized);
|
||||
}
|
||||
|
||||
public void OnUpdate(float deltaTime)
|
||||
{
|
||||
if (_canRotate.Evaluate() == false)
|
||||
return;
|
||||
|
||||
if (_direction.Value == Vector3.zero)
|
||||
return;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ using System;
|
||||
using System.Collections;
|
||||
using _Project.Develop.Runtime.Entities;
|
||||
using _Project.Develop.Runtime.Logic.Gameplay.Features;
|
||||
using _Project.Develop.Runtime.Utilities.InputManagement;
|
||||
using _Project.Develop.Runtime.Utils.InputManagement;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Assets._Project.Develop.Runtime.Gameplay.Infrastructure
|
||||
@@ -18,7 +18,7 @@ namespace Assets._Project.Develop.Runtime.Gameplay.Infrastructure
|
||||
private EntitiesLifeContext _entitiesLifeContext;
|
||||
private GameplayInputArgs _gameplayArgs;
|
||||
|
||||
private IPlayerInputService _playerInput;
|
||||
private IPlayerInput _playerInput;
|
||||
|
||||
public override void ProcessRegistrations(DIContainer container, IInputSceneArgs sceneArgs = null)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using _Project.Develop.Runtime.Entities;
|
||||
using _Project.Develop.Runtime.Utilities.InputManagement;
|
||||
using _Project.Develop.Runtime.Utils.InputManagement;
|
||||
using Assets._Project.Develop.Runtime.Infrastructure.DI;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace _Project.Develop.Runtime.Logic.Gameplay.Features
|
||||
{
|
||||
_container = container;
|
||||
|
||||
_container.Resolve<IPlayerInput>().Enable();
|
||||
_entitiesFactory = _container.Resolve<EntitiesFactory>();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f03531ec1be8466f8e4dc6bff6bacff6
|
||||
timeCreated: 1770396920
|
||||
guid: 525e15ae6349432194c910fa34806bb0
|
||||
timeCreated: 1771524166
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 34ffa6b3aff14a1eaeb9f4876beb1b12
|
||||
timeCreated: 1770416206
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace _Project.Develop.Runtime.Utils.InputManagement
|
||||
{
|
||||
public interface IInput : IDisposable
|
||||
{
|
||||
bool IsEnabled { get; }
|
||||
|
||||
void Enable();
|
||||
|
||||
void Disable();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e6f13ff5fdd4bfcae00ac967fe1803a
|
||||
timeCreated: 1770406587
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace _Project.Develop.Runtime.Utils.InputManagement.Inputs
|
||||
{
|
||||
public abstract class InputBase : IDisposable
|
||||
{
|
||||
public bool IsEnabled { get; private set; }
|
||||
|
||||
private readonly List<IDisposable> _disposables = new();
|
||||
|
||||
protected InputState<T> Register<T>(InputAction action) where T : struct
|
||||
{
|
||||
InputState<T> state = new(action);
|
||||
|
||||
if (state is IDisposable disposable)
|
||||
_disposables.Add(disposable);
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
public virtual void Enable() => IsEnabled = true;
|
||||
|
||||
public virtual void Disable() => IsEnabled = false;
|
||||
|
||||
public virtual void Dispose()
|
||||
{
|
||||
Disable();
|
||||
|
||||
foreach (IDisposable disposable in _disposables)
|
||||
disposable.Dispose();
|
||||
|
||||
_disposables.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ea9e4fc30604b498571755608da3e91
|
||||
timeCreated: 1770464464
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace _Project.Develop.Runtime.Utils.InputManagement
|
||||
{
|
||||
public class InputState<T> : IDisposable where T : struct
|
||||
{
|
||||
public event Action<T> Enter;
|
||||
public event Action<T> Perform;
|
||||
public event Action<T> Exit;
|
||||
|
||||
public bool IsActive { get; private set; }
|
||||
public T Value { get; private set; }
|
||||
|
||||
private readonly InputAction _inputAction;
|
||||
|
||||
public InputState(InputAction inputAction)
|
||||
{
|
||||
_inputAction = inputAction;
|
||||
Subscribe();
|
||||
}
|
||||
|
||||
private void Subscribe()
|
||||
{
|
||||
_inputAction.started += OnStarted;
|
||||
_inputAction.performed += OnPerformed;
|
||||
_inputAction.canceled += OnCanceled;
|
||||
}
|
||||
|
||||
private void Unsubscribe()
|
||||
{
|
||||
_inputAction.started -= OnStarted;
|
||||
_inputAction.performed -= OnPerformed;
|
||||
_inputAction.canceled -= OnCanceled;
|
||||
}
|
||||
|
||||
private void OnStarted(InputAction.CallbackContext ctx)
|
||||
{
|
||||
T value = ctx.ReadValue<T>();
|
||||
Value = value;
|
||||
IsActive = true;
|
||||
Enter?.Invoke(value);
|
||||
}
|
||||
|
||||
private void OnPerformed(InputAction.CallbackContext ctx)
|
||||
{
|
||||
T value = ctx.ReadValue<T>();
|
||||
Value = value;
|
||||
Perform?.Invoke(value);
|
||||
}
|
||||
|
||||
private void OnCanceled(InputAction.CallbackContext ctx)
|
||||
{
|
||||
T value = ctx.ReadValue<T>();
|
||||
Value = value;
|
||||
IsActive = false;
|
||||
Exit?.Invoke(value);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Unsubscribe();
|
||||
Enter = null;
|
||||
Perform = null;
|
||||
Exit = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e8cfbe040c144edc86e9ada246bf8b52
|
||||
timeCreated: 1770416153
|
||||
@@ -1,77 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace _Project.Develop.Runtime.Utilities.InputManagement
|
||||
{
|
||||
public class DesktopPlayerInputService : IPlayerInputService
|
||||
{
|
||||
public event Action OnJump;
|
||||
public event Action OnInteract;
|
||||
public event Action OnPrevious;
|
||||
public event Action OnNext;
|
||||
|
||||
private const string HorizontalAxisKey = "Horizontal";
|
||||
private const string VerticalAxisKey = "Vertical";
|
||||
|
||||
private const KeyCode JumpKey = KeyCode.Space;
|
||||
private const KeyCode InteractKey = KeyCode.F;
|
||||
private const KeyCode PreviousKey = KeyCode.Q;
|
||||
private const KeyCode NextKey = KeyCode.E;
|
||||
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
|
||||
public Vector2 Move
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsEnabled == false)
|
||||
return Vector2.zero;
|
||||
|
||||
return new Vector2(Input.GetAxisRaw(HorizontalAxisKey), Input.GetAxisRaw(VerticalAxisKey));
|
||||
}
|
||||
}
|
||||
|
||||
public void Enable() => IsEnabled = true;
|
||||
|
||||
public void Disable() => IsEnabled = false;
|
||||
|
||||
public void Update(float deltaTime)
|
||||
{
|
||||
if (IsEnabled == false)
|
||||
return;
|
||||
|
||||
if (Input.GetKeyDown(JumpKey))
|
||||
OnJump?.Invoke();
|
||||
|
||||
if (Input.GetKeyDown(InteractKey))
|
||||
OnInteract?.Invoke();
|
||||
|
||||
if (Input.GetKeyDown(PreviousKey))
|
||||
OnPrevious?.Invoke();
|
||||
|
||||
if (Input.GetKeyDown(NextKey))
|
||||
OnNext?.Invoke();
|
||||
}
|
||||
|
||||
public string GetKeyboardInput()
|
||||
{
|
||||
if (IsEnabled == false)
|
||||
return null;
|
||||
|
||||
for (int i = 0; i <= 9; i++)
|
||||
if (Input.GetKeyDown(KeyCode.Alpha0 + i))
|
||||
return i.ToString();
|
||||
|
||||
for (int i = 0; i < 26; i++)
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.A + i))
|
||||
{
|
||||
char letter = (char)('A' + i);
|
||||
return letter.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6e89482289184f2b93a4ddf77af98da7
|
||||
timeCreated: 1770397340
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace _Project.Develop.Runtime.Utilities.InputManagement
|
||||
{
|
||||
public interface IInput
|
||||
{
|
||||
bool IsEnabled { get; set; }
|
||||
|
||||
void Enable();
|
||||
|
||||
void Disable();
|
||||
|
||||
void Update(float deltaTime);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d448be7d0ba4d988578d646da708c41
|
||||
timeCreated: 1770397262
|
||||
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace _Project.Develop.Runtime.Utilities.InputManagement
|
||||
{
|
||||
public interface IPlayerInputService : IInput
|
||||
{
|
||||
event Action OnJump;
|
||||
|
||||
event Action OnInteract;
|
||||
|
||||
event Action OnPrevious;
|
||||
|
||||
event Action OnNext;
|
||||
|
||||
Vector2 Move { get; }
|
||||
|
||||
string GetKeyboardInput();
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: de8df9e58e214573bb1d44996dc62484
|
||||
timeCreated: 1770396950
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace _Project.Develop.Runtime.Utilities.InputManagement
|
||||
{
|
||||
public interface IUIInputService : IInput
|
||||
{
|
||||
// всякие клики
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f60f1acd260a4846943950a6e6682a9b
|
||||
timeCreated: 1770397255
|
||||
@@ -0,0 +1,13 @@
|
||||
using _Project.Develop.Runtime.Utils.InputManagement.Inputs;
|
||||
|
||||
namespace _Project.Develop.Runtime.Utils.InputManagement
|
||||
{
|
||||
public class InputFactory
|
||||
{
|
||||
private UserInputAction _userInput = new();
|
||||
|
||||
public PlayerInput CreatePlayerInput() => new(_userInput.Player);
|
||||
|
||||
public UIInput CreateUIInput() => new(_userInput.UI);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 31af757382f6411f879de037849b5195
|
||||
timeCreated: 1770410738
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 13a43e150c044c9aa77c0ac983add8d2
|
||||
timeCreated: 1770408893
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace _Project.Develop.Runtime.Utils.InputManagement
|
||||
{
|
||||
public interface IPlayerInput : IInput
|
||||
{
|
||||
InputState<Vector2> Move { get; }
|
||||
InputState<Vector2> Look { get; }
|
||||
InputState<float> Jump { get; }
|
||||
InputState<float> Sprint { get; }
|
||||
InputState<float> Interact { get; }
|
||||
InputState<float> Crouch { get; }
|
||||
InputState<float> Previous { get; }
|
||||
InputState<float> Next { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26e35755eaef45dc9366a75a77333fae
|
||||
timeCreated: 1770408646
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace _Project.Develop.Runtime.Utils.InputManagement
|
||||
{
|
||||
public interface IUIInput : IInput
|
||||
{
|
||||
InputState<Vector2> Point { get; }
|
||||
InputState<Vector2> Navigate { get; }
|
||||
InputState<float> Click { get; }
|
||||
InputState<float> RightClick { get; }
|
||||
InputState<float> MiddleClick { get; }
|
||||
InputState<Vector2> ScrollWheel { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68276677297d4ea2b4cf908903e2f927
|
||||
timeCreated: 1770408654
|
||||
@@ -0,0 +1,52 @@
|
||||
using UnityEngine;
|
||||
using PlayerActions = UserInputAction.PlayerActions;
|
||||
|
||||
namespace _Project.Develop.Runtime.Utils.InputManagement.Inputs
|
||||
{
|
||||
public class PlayerInput : InputBase, IPlayerInput
|
||||
{
|
||||
public InputState<Vector2> Move { get; }
|
||||
public InputState<Vector2> Look { get; }
|
||||
public InputState<float> Jump { get; }
|
||||
public InputState<float> Sprint { get; }
|
||||
public InputState<float> Interact { get; }
|
||||
public InputState<float> Crouch { get; }
|
||||
public InputState<float> Previous { get; }
|
||||
public InputState<float> Next { get; }
|
||||
|
||||
private readonly PlayerActions _playerActions;
|
||||
|
||||
public PlayerInput(PlayerActions playerActions)
|
||||
{
|
||||
_playerActions = playerActions;
|
||||
|
||||
Move = Register<Vector2>(_playerActions.Move);
|
||||
Look = Register<Vector2>(_playerActions.Look);
|
||||
Jump = Register<float>(_playerActions.Jump);
|
||||
Sprint = Register<float>(_playerActions.Sprint);
|
||||
Interact = Register<float>(_playerActions.Interact);
|
||||
Crouch = Register<float>(_playerActions.Crouch);
|
||||
Previous = Register<float>(_playerActions.Previous);
|
||||
Next = Register<float>(_playerActions.Next);
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
Disable();
|
||||
}
|
||||
|
||||
public override void Enable()
|
||||
{
|
||||
base.Enable();
|
||||
_playerActions.Enable();
|
||||
}
|
||||
|
||||
public override void Disable()
|
||||
{
|
||||
base.Disable();
|
||||
_playerActions.Disable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f24c94d005646f18e40368665121d62
|
||||
timeCreated: 1770408676
|
||||
@@ -0,0 +1,49 @@
|
||||
using UnityEngine;
|
||||
|
||||
using UIActions = UserInputAction.UIActions;
|
||||
|
||||
namespace _Project.Develop.Runtime.Utils.InputManagement.Inputs
|
||||
{
|
||||
public class UIInput : InputBase, IUIInput
|
||||
{
|
||||
public InputState<Vector2> Point { get; }
|
||||
public InputState<Vector2> Navigate { get; }
|
||||
public InputState<float> Click { get; }
|
||||
public InputState<float> RightClick { get; }
|
||||
public InputState<float> MiddleClick { get; }
|
||||
public InputState<Vector2> ScrollWheel { get; }
|
||||
// public InputState<Vector2> DeviceOrientation { get; }
|
||||
|
||||
private readonly UIActions _uiActions;
|
||||
|
||||
public UIInput(UIActions uiActions)
|
||||
{
|
||||
_uiActions = uiActions;
|
||||
|
||||
Point = Register<Vector2>(_uiActions.Point);
|
||||
Navigate = Register<Vector2>(_uiActions.Navigate);
|
||||
Click = Register<float>(_uiActions.Click);
|
||||
RightClick = Register<float>(_uiActions.RightClick);
|
||||
MiddleClick = Register<float>(_uiActions.MiddleClick);
|
||||
ScrollWheel = Register<Vector2>(_uiActions.ScrollWheel);
|
||||
// DeviceOrientation = Register<Vector2>(_uiActions.TrackedDeviceOrientation);
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
Disable();
|
||||
}
|
||||
|
||||
public override void Enable()
|
||||
{
|
||||
base.Enable();
|
||||
_uiActions.Enable();
|
||||
}
|
||||
|
||||
public override void Disable()
|
||||
{
|
||||
base.Disable();
|
||||
_uiActions.Disable();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bdb01f1b865b461f816e8d4dff0c0aeb
|
||||
timeCreated: 1770414125
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace _Project.Develop.Runtime.Utils.InputManagement
|
||||
{
|
||||
public class RebindInputService
|
||||
{
|
||||
// ахаха захотел он смену клавиш
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a0db421683434be6adebcb01ebb5b2ff
|
||||
timeCreated: 1770413119
|
||||
@@ -1,11 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace _Project.Develop.Runtime.Utilities.StateMachine
|
||||
{
|
||||
public interface IStateChanger
|
||||
{
|
||||
event Action<State> Changed;
|
||||
|
||||
StateMachine ChangeState<TState>() where TState : State;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b705c6047e545c483833a0fe80a6850
|
||||
timeCreated: 1770390018
|
||||
@@ -1,17 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace _Project.Develop.Runtime.Utilities.StateMachine
|
||||
{
|
||||
public abstract class State
|
||||
{
|
||||
public event Action Entered;
|
||||
|
||||
public event Action Exited;
|
||||
|
||||
public virtual void OnEnter() => Entered?.Invoke();
|
||||
|
||||
public virtual void OnExit() => Exited?.Invoke();
|
||||
|
||||
public virtual void Update(float deltaTime) { }
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 991e020273854d7683766af332608683
|
||||
timeCreated: 1770376146
|
||||
@@ -1,79 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace _Project.Develop.Runtime.Utilities.StateMachine
|
||||
{
|
||||
public abstract class StateMachine : IStateChanger
|
||||
{
|
||||
public event Action<State> Changed;
|
||||
|
||||
public State Current { get; private set; }
|
||||
|
||||
private readonly Dictionary<Type, State> _states = new();
|
||||
private bool _isRunning;
|
||||
|
||||
public StateMachine(params State[] states)
|
||||
{
|
||||
foreach (State state in states)
|
||||
Add(state);
|
||||
}
|
||||
|
||||
public void Update(float deltaTime)
|
||||
{
|
||||
if (_isRunning == false)
|
||||
return;
|
||||
|
||||
Current?.Update(deltaTime);
|
||||
}
|
||||
|
||||
public StateMachine Add(State state)
|
||||
{
|
||||
if (state == null)
|
||||
throw new ArgumentNullException(nameof(state));
|
||||
|
||||
Type type = state.GetType();
|
||||
|
||||
if (_states.TryAdd(type, state) == false)
|
||||
throw new InvalidOperationException($"[StateMachine] State {type.Name} is already registered");
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public StateMachine Remove<TState>() where TState : State
|
||||
{
|
||||
Type type = typeof(TState);
|
||||
|
||||
if (_states.Remove(type) == false)
|
||||
throw new InvalidOperationException($"[StateMachine] State {type.Name} is not registered");
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public StateMachine ChangeState<TState>() where TState : State
|
||||
{
|
||||
Type type = typeof(TState);
|
||||
|
||||
if (_states.TryGetValue(type, out State state) == false)
|
||||
throw new InvalidOperationException($"[StateMachine] State {type.Name} is not registered");
|
||||
|
||||
SwitchState(state);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
private void SwitchState(State newState)
|
||||
{
|
||||
if (newState == null)
|
||||
throw new ArgumentNullException(nameof(newState));
|
||||
|
||||
if (Current != null)
|
||||
Current.OnExit();
|
||||
else
|
||||
_isRunning = true;
|
||||
|
||||
Current = newState;
|
||||
Changed?.Invoke(Current);
|
||||
Current.OnEnter();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ GameObject:
|
||||
- component: {fileID: 6565447619237781124}
|
||||
- component: {fileID: 8643992716899077862}
|
||||
m_Layer: 0
|
||||
m_Name: TestEntity 1
|
||||
m_Name: Ghost
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -1,312 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6238656115224209256
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3482713960133750432}
|
||||
- component: {fileID: 8626195749695403117}
|
||||
- component: {fileID: 4032663711928052727}
|
||||
m_Layer: 0
|
||||
m_Name: Sphere
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3482713960133750432
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6238656115224209256}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0.3, z: 0.22}
|
||||
m_LocalScale: {x: 1, y: 0.57116395, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3729330896622341159}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &8626195749695403117
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6238656115224209256}
|
||||
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &4032663711928052727
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6238656115224209256}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, 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: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!1 &6344150908040749382
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3712880853837558930}
|
||||
- component: {fileID: 7031502133547492830}
|
||||
- component: {fileID: 6565447619237781124}
|
||||
- component: {fileID: 8643992716899077862}
|
||||
- component: {fileID: -3493177906804083266}
|
||||
- component: {fileID: -5997931266940665224}
|
||||
m_Layer: 0
|
||||
m_Name: TestEntity
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3712880853837558930
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6344150908040749382}
|
||||
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:
|
||||
- {fileID: 3729330896622341159}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &7031502133547492830
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6344150908040749382}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0fa38a390e3026e4da73b8535ef0c601, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &6565447619237781124
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6344150908040749382}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b7fdeece4c60497ea61a1006e47bfbc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &8643992716899077862
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6344150908040749382}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b3d77209b50f4ecf9185ae250a76b909, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!143 &-3493177906804083266
|
||||
CharacterController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6344150908040749382}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Height: 2
|
||||
m_Radius: 0.5
|
||||
m_SlopeLimit: 45
|
||||
m_StepOffset: 0.3
|
||||
m_SkinWidth: 0.08
|
||||
m_MinMoveDistance: 0.001
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &-5997931266940665224
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6344150908040749382}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 901d0931c1074853a656db4b4364f490, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &7421563490521616768
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5801233178194481557}
|
||||
- component: {fileID: 5626862109688605077}
|
||||
- component: {fileID: 12644309328441543}
|
||||
m_Layer: 0
|
||||
m_Name: Body
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5801233178194481557
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7421563490521616768}
|
||||
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: 0.83449, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3729330896622341159}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &5626862109688605077
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7421563490521616768}
|
||||
m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &12644309328441543
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7421563490521616768}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, 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: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!1 &8220022131449611056
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3729330896622341159}
|
||||
m_Layer: 0
|
||||
m_Name: View
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3729330896622341159
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8220022131449611056}
|
||||
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:
|
||||
- {fileID: 5801233178194481557}
|
||||
- {fileID: 3482713960133750432}
|
||||
m_Father: {fileID: 3712880853837558930}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -1,6 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9db404a82293f814a96d2822f7663461
|
||||
PrefabImporter:
|
||||
guid: 457e2ddf28e0cef47a8720c92fd48ace
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
8
Assets/_Project/Settings/Input.meta
Normal file
8
Assets/_Project/Settings/Input.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 701cb31d37259ef4795a56b70918a7f0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1459
Assets/_Project/Settings/Input/UserInputAction.cs
Normal file
1459
Assets/_Project/Settings/Input/UserInputAction.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a9e1e9ad9be48b083a7678034b4312e
|
||||
guid: 7c4feabd47afc37499ace985599e68d5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
1042
Assets/_Project/Settings/Input/UserInputAction.inputactions
Normal file
1042
Assets/_Project/Settings/Input/UserInputAction.inputactions
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf8ca7caa26651148b675eed74cbe3eb
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
|
||||
generateWrapperCode: 1
|
||||
wrapperCodePath:
|
||||
wrapperClassName:
|
||||
wrapperCodeNamespace:
|
||||
@@ -6,6 +6,7 @@
|
||||
"com.unity.ide.rider": "3.0.27",
|
||||
"com.unity.ide.visualstudio": "2.0.22",
|
||||
"com.unity.ide.vscode": "1.2.5",
|
||||
"com.unity.inputsystem": "1.7.0",
|
||||
"com.unity.render-pipelines.universal": "14.0.9",
|
||||
"com.unity.test-framework": "1.1.33",
|
||||
"com.unity.textmeshpro": "3.0.6",
|
||||
|
||||
@@ -61,6 +61,15 @@
|
||||
"dependencies": {},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.inputsystem": {
|
||||
"version": "1.7.0",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
"com.unity.modules.uielements": "1.0.0"
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.mathematics": {
|
||||
"version": "1.2.6",
|
||||
"depth": 1,
|
||||
|
||||
@@ -925,7 +925,7 @@ PlayerSettings:
|
||||
hmiLogStartupTiming: 0
|
||||
hmiCpuConfiguration:
|
||||
apiCompatibilityLevel: 6
|
||||
activeInputHandler: 0
|
||||
activeInputHandler: 2
|
||||
windowsGamepadBackendHint: 0
|
||||
cloudProjectId: 4a15d730-99ee-4a69-b00c-c0c75aa639bd
|
||||
framebufferDepthMemorylessMode: 0
|
||||
|
||||
Reference in New Issue
Block a user