mirror of
https://github.com/Bragin-Stepan/project-entity.git
synced 2026-03-05 07:41:10 +00:00
feat: add deal damage after teleport system
This commit is contained in:
@@ -130,15 +130,6 @@ namespace _Project.Develop.Runtime.Entities
|
||||
return entity;
|
||||
}
|
||||
|
||||
public Entity CreateMage(Vector3 position)
|
||||
{
|
||||
Entity entity = CreateEmpty();
|
||||
|
||||
_monoEntitiesFactory.Create(entity, position, PathToResources.Entity.Mage);
|
||||
|
||||
return entity;
|
||||
}
|
||||
|
||||
public Entity CreateGhost(Vector3 position)
|
||||
{
|
||||
Entity entity = CreateEmpty();
|
||||
@@ -153,8 +144,8 @@ namespace _Project.Develop.Runtime.Entities
|
||||
.AddRotateDirection()
|
||||
.AddMoveSpeed(new ReactiveVariable<float>(10))
|
||||
.AddRotationSpeed(new ReactiveVariable<float>(800))
|
||||
.AddMaxHealth(new ReactiveVariable<float>(150))
|
||||
.AddCurrentHealth(new ReactiveVariable<float>(150))
|
||||
.AddMaxHealth(new ReactiveVariable<float>(50))
|
||||
.AddCurrentHealth(new ReactiveVariable<float>(50))
|
||||
.AddBodyContactDamage(new ReactiveVariable<float>(50))
|
||||
.AddTakeDamageRequest()
|
||||
.AddTakeDamageEvent()
|
||||
@@ -231,6 +222,10 @@ namespace _Project.Develop.Runtime.Entities
|
||||
.AddFindTeleportPointRequest()
|
||||
.AddEndTeleportEvent()
|
||||
|
||||
.AddTeleportDamage(new ReactiveVariable<float>(50))
|
||||
.AddTeleportDamageRadius(new ReactiveVariable<float>(6))
|
||||
.AddTeleportDamageMask(Layers.CharactersMask)
|
||||
|
||||
.AddTeleportEnergyCost(new ReactiveVariable<int>(20))
|
||||
.AddTeleportSearchRadius(new ReactiveVariable<float>(6))
|
||||
|
||||
@@ -294,6 +289,7 @@ namespace _Project.Develop.Runtime.Entities
|
||||
.AddSystem(new FindRandomPointForTeleportSystem())
|
||||
.AddSystem(new EndTeleportSystem())
|
||||
.AddSystem(new InstantTeleportSystem())
|
||||
.AddSystem(new DealDamageAfterTeleportSystem(_collidersRegistryService))
|
||||
|
||||
.AddSystem(new BodyContactsDetectingSystem())
|
||||
.AddSystem(new BodyContactsEntitiesFilterSystem(_collidersRegistryService))
|
||||
|
||||
@@ -327,6 +327,73 @@ namespace _Project.Develop.Runtime.Entities
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.TeleportEnergyCost() {Value = value});
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.TeleportDamage TeleportDamageC => GetComponent<_Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.TeleportDamage>();
|
||||
|
||||
public _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> TeleportDamage => TeleportDamageC.Value;
|
||||
|
||||
public bool TryGetTeleportDamage(out _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> value)
|
||||
{
|
||||
bool result = TryGetComponent(out _Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.TeleportDamage 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 AddTeleportDamage()
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.TeleportDamage() { Value = new _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single>() });
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddTeleportDamage(_Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> value)
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.TeleportDamage() {Value = value});
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.TeleportDamageRadius TeleportDamageRadiusC => GetComponent<_Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.TeleportDamageRadius>();
|
||||
|
||||
public _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> TeleportDamageRadius => TeleportDamageRadiusC.Value;
|
||||
|
||||
public bool TryGetTeleportDamageRadius(out _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> value)
|
||||
{
|
||||
bool result = TryGetComponent(out _Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.TeleportDamageRadius 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 AddTeleportDamageRadius()
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.TeleportDamageRadius() { Value = new _Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single>() });
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddTeleportDamageRadius(_Project.Develop.Runtime.Utils.ReactiveManagement.ReactiveVariable<System.Single> value)
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.TeleportDamageRadius() {Value = value});
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.TeleportDamageMask TeleportDamageMaskC => GetComponent<_Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.TeleportDamageMask>();
|
||||
|
||||
public UnityEngine.LayerMask TeleportDamageMask => TeleportDamageMaskC.Value;
|
||||
|
||||
public bool TryGetTeleportDamageMask(out UnityEngine.LayerMask value)
|
||||
{
|
||||
bool result = TryGetComponent(out _Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.TeleportDamageMask component);
|
||||
if(result)
|
||||
value = component.Value;
|
||||
else
|
||||
value = default(UnityEngine.LayerMask);
|
||||
return result;
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Entities.Entity AddTeleportDamageMask(UnityEngine.LayerMask value)
|
||||
{
|
||||
return AddComponent(new _Project.Develop.Runtime.Logic.Gameplay.Features.Teleport.TeleportDamageMask() {Value = value});
|
||||
}
|
||||
|
||||
public _Project.Develop.Runtime.Logic.Gameplay.Features.Sensors.CapsuleColliderComponent CapsuleColliderC => GetComponent<_Project.Develop.Runtime.Logic.Gameplay.Features.Sensors.CapsuleColliderComponent>();
|
||||
|
||||
public UnityEngine.CapsuleCollider CapsuleCollider => CapsuleColliderC.Value;
|
||||
|
||||
Reference in New Issue
Block a user