Atrocities
This commit is contained in:
parent
8e0f90ae3d
commit
9680b21792
90 changed files with 324 additions and 69 deletions
1
scripts/Cursor.cs.uid
Normal file
1
scripts/Cursor.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://c6ucy48qwaxuc
|
||||
|
|
@ -7,7 +7,7 @@ namespace Newlon;
|
|||
// Button that contains level to load
|
||||
//
|
||||
|
||||
public partial class LevelButton : Node
|
||||
public partial class LevelButton : TextureButton
|
||||
{
|
||||
[Export] private Script _levelScript;
|
||||
[Export] private PackedScene _levelTileset;
|
||||
|
|
|
|||
1
scripts/LevelButton.cs.uid
Normal file
1
scripts/LevelButton.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cn3q18jh2rej7
|
||||
1
scripts/LevelController.cs.uid
Normal file
1
scripts/LevelController.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://v8gsvdqhbtml
|
||||
1
scripts/Sun.cs.uid
Normal file
1
scripts/Sun.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://qgeovvluk8yj
|
||||
1
scripts/Utility.cs.uid
Normal file
1
scripts/Utility.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://ccaap8m63b62t
|
||||
54
scripts/components/Armor.cs
Normal file
54
scripts/components/Armor.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
using Godot;
|
||||
|
||||
namespace Newlon.Components;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class Armor : Node
|
||||
{
|
||||
[Signal]
|
||||
public delegate void ArmorDamagedEventHandler(int hp);
|
||||
[Signal]
|
||||
public delegate void ArmorLostEventHandler();
|
||||
|
||||
[Export]
|
||||
private int _maxHP;
|
||||
private int _hp;
|
||||
private bool _lost = false;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_hp = _maxHP;
|
||||
}
|
||||
|
||||
public int RecieveDamage(int damage)
|
||||
{
|
||||
if(_lost)
|
||||
return damage;
|
||||
int returnAmount = 0;
|
||||
_hp -= damage;
|
||||
if(_hp <= 0)
|
||||
{
|
||||
returnAmount = _hp;
|
||||
_hp = 0;
|
||||
EmitSignal(SignalName.ArmorLost);
|
||||
_lost = true;
|
||||
}
|
||||
EmitSignal(SignalName.ArmorDamaged,_hp);
|
||||
return returnAmount;
|
||||
}
|
||||
|
||||
public int Heal(int amount)
|
||||
{
|
||||
if(_lost)
|
||||
return amount;
|
||||
int returnAmount = 0;
|
||||
_hp += amount;
|
||||
if (_hp >= _maxHP)
|
||||
{
|
||||
returnAmount = _hp-_maxHP;
|
||||
_hp = _maxHP;
|
||||
}
|
||||
EmitSignal(SignalName.ArmorDamaged,_hp);
|
||||
return returnAmount;
|
||||
}
|
||||
}
|
||||
1
scripts/components/Armor.cs.uid
Normal file
1
scripts/components/Armor.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://fd4im1fmwc5n
|
||||
1
scripts/components/FlashComponent.cs.uid
Normal file
1
scripts/components/FlashComponent.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://c5vfccegyy01t
|
||||
1
scripts/components/IEntity.cs.uid
Normal file
1
scripts/components/IEntity.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cjdeq452vk2ll
|
||||
1
scripts/components/ILocalTimescale.cs.uid
Normal file
1
scripts/components/ILocalTimescale.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bxu6ljkmmlgd5
|
||||
1
scripts/components/IProjectile.cs.uid
Normal file
1
scripts/components/IProjectile.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://blbiq5r0w17hf
|
||||
1
scripts/components/LevelGUIElements.cs.uid
Normal file
1
scripts/components/LevelGUIElements.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cwa1eydeiy3y4
|
||||
1
scripts/components/LinearProjectile.cs.uid
Normal file
1
scripts/components/LinearProjectile.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dxlwvwy3hj56x
|
||||
1
scripts/components/gui/FastForwardButton.cs.uid
Normal file
1
scripts/components/gui/FastForwardButton.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cwn3bd2k7mdq6
|
||||
1
scripts/components/gui/ShovelButton.cs.uid
Normal file
1
scripts/components/gui/ShovelButton.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://d4dbg0us5ngxy
|
||||
1
scripts/components/gui/SunCounter.cs.uid
Normal file
1
scripts/components/gui/SunCounter.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dwxohya1exdkh
|
||||
1
scripts/components/gui/VeilResizer.cs.uid
Normal file
1
scripts/components/gui/VeilResizer.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://ddi84kmmq1qla
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://eq3ecja30mlj
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://d26waisd3v488
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://b3sut12n56w1y
|
||||
1
scripts/components/gui/seedpackets/HotbarHandler.cs.uid
Normal file
1
scripts/components/gui/seedpackets/HotbarHandler.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://gvgt14v1hndn
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://bnygd8pcmoewp
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://o0ly38oqcuwu
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://q2r43hym7s82
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://mdm8cepvvo4t
|
||||
1
scripts/components/gui/seedpackets/Seedpacket.cs.uid
Normal file
1
scripts/components/gui/seedpackets/Seedpacket.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cn6ddajdtf4ep
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://cr774updc04fu
|
||||
|
|
@ -25,7 +25,8 @@ public partial class PlantField : Node2D
|
|||
_slot = slot;
|
||||
if (plant == null)
|
||||
{
|
||||
_plantSetter.GetChild(0).QueueFree();
|
||||
foreach(var child in _plantSetter.GetChildren())
|
||||
child.QueueFree();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
1
scripts/components/level/PlantField.cs.uid
Normal file
1
scripts/components/level/PlantField.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bj7rw2f6qu1lg
|
||||
1
scripts/components/level/PoolContainer.cs.uid
Normal file
1
scripts/components/level/PoolContainer.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bso32xkw738sy
|
||||
1
scripts/components/level/RuntimeLevelData.cs.uid
Normal file
1
scripts/components/level/RuntimeLevelData.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bndu1h5kgcde8
|
||||
1
scripts/components/level/SunSpawner.cs.uid
Normal file
1
scripts/components/level/SunSpawner.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cslqjdd5wq4rc
|
||||
1
scripts/components/plants/AreaAttack.cs.uid
Normal file
1
scripts/components/plants/AreaAttack.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://co7ttejdo2qot
|
||||
1
scripts/components/plants/ExplosionComponent.cs.uid
Normal file
1
scripts/components/plants/ExplosionComponent.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bhl6o2m3fn4xg
|
||||
1
scripts/components/plants/Eyesight.cs.uid
Normal file
1
scripts/components/plants/Eyesight.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dn53jvpjyg63l
|
||||
1
scripts/components/plants/PlantEyesightLimiter.cs.uid
Normal file
1
scripts/components/plants/PlantEyesightLimiter.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://hccb0aee0x0o
|
||||
1
scripts/components/plants/PlantSunSpawner.cs.uid
Normal file
1
scripts/components/plants/PlantSunSpawner.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://b71gebny84s81
|
||||
1
scripts/components/plants/ReturnEffect.cs.uid
Normal file
1
scripts/components/plants/ReturnEffect.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bmtukcq10m8wo
|
||||
1
scripts/components/plants/RuntimePlantData.cs.uid
Normal file
1
scripts/components/plants/RuntimePlantData.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dli2i6albvugt
|
||||
1
scripts/components/plants/Shooter.cs.uid
Normal file
1
scripts/components/plants/Shooter.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://ceprqkraw3v6m
|
||||
1
scripts/components/plants/ThreepeaterShooter.cs.uid
Normal file
1
scripts/components/plants/ThreepeaterShooter.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://djpc0kvagpadv
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://cljytsmqac0w7
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://3dbmgnr7qxee
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://btkmd86pn828y
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://bdk5iqtw4xbkl
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://c7qfh4py0uulo
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://dqquodxaijmem
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://bth7gah4tn7uj
|
||||
1
scripts/components/zombies/AudioDamage.cs.uid
Normal file
1
scripts/components/zombies/AudioDamage.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bsg4utgc0u0vo
|
||||
1
scripts/components/zombies/EatBox.cs.uid
Normal file
1
scripts/components/zombies/EatBox.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dqyony6jxt2p0
|
||||
|
|
@ -16,14 +16,13 @@ public partial class RuntimeZombieData : Node2D, IEntity, ILocalTimescale, IEffe
|
|||
[Export]
|
||||
private int _maxHP;
|
||||
[Export]
|
||||
private int _line;
|
||||
private Armor _armor;
|
||||
|
||||
|
||||
private float _localTimescale = 1.0f;
|
||||
public int Hp => _hp;
|
||||
|
||||
public int MaxHp => _maxHP;
|
||||
|
||||
public int Line => _line;
|
||||
public int MaxHp => _maxHP;
|
||||
|
||||
public bool AbleToEat = true;
|
||||
|
||||
|
|
@ -54,8 +53,14 @@ public partial class RuntimeZombieData : Node2D, IEntity, ILocalTimescale, IEffe
|
|||
|
||||
public void Heal(int amount,Node origin)
|
||||
{
|
||||
_hp += amount;
|
||||
if(_armor != null)
|
||||
{
|
||||
_hp += _armor.Heal(amount);
|
||||
}
|
||||
else
|
||||
_hp += amount;
|
||||
EmitSignal(SignalName.OnHPChanged,amount,origin);
|
||||
|
||||
|
||||
if (MaxHp > 0)
|
||||
{
|
||||
|
|
@ -65,7 +70,12 @@ public partial class RuntimeZombieData : Node2D, IEntity, ILocalTimescale, IEffe
|
|||
|
||||
public void TakeDamage(int amount, Node origin, Utility.DamageTypes damageType = Utility.DamageTypes.PHYSICAL)
|
||||
{
|
||||
_hp -= amount;
|
||||
if(_armor != null)
|
||||
{
|
||||
_hp -= _armor.RecieveDamage(amount);
|
||||
}
|
||||
else
|
||||
_hp -= amount;
|
||||
EmitSignal(SignalName.OnHPChanged,-amount, origin);
|
||||
|
||||
if (_hp <= 0)
|
||||
|
|
|
|||
1
scripts/components/zombies/RuntimeZombieData.cs.uid
Normal file
1
scripts/components/zombies/RuntimeZombieData.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dildme6epx8l4
|
||||
1
scripts/components/zombies/ZombieMover.cs.uid
Normal file
1
scripts/components/zombies/ZombieMover.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://7hdj2k14lfe4
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://cgf61r46dgh4m
|
||||
1
scripts/debug/Cheats.cs.uid
Normal file
1
scripts/debug/Cheats.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cb8n22kkqa8ig
|
||||
1
scripts/debug/Clock.cs.uid
Normal file
1
scripts/debug/Clock.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://d2aq2wjq0gt7x
|
||||
1
scripts/resources/PlantResource.cs.uid
Normal file
1
scripts/resources/PlantResource.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cyenlko1knygw
|
||||
1
scripts/systems/effects/Effect.cs.uid
Normal file
1
scripts/systems/effects/Effect.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bcc7skl7ts6sh
|
||||
|
|
@ -47,7 +47,6 @@ public partial class GarlicEffect : Effect
|
|||
tween.TweenProperty(zombieData,"position:y",zombieData.GlobalPosition.Y + Utility.TileHeight * mult, 1.0);
|
||||
tween.TweenCallback(Callable.From(() => {zombieData.AbleToEat = true;}));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public override void Process(Node target)
|
||||
|
|
|
|||
1
scripts/systems/effects/GarlicEffect.cs.uid
Normal file
1
scripts/systems/effects/GarlicEffect.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bb6lv1djnqjaw
|
||||
1
scripts/systems/effects/IEffectHandler.cs.uid
Normal file
1
scripts/systems/effects/IEffectHandler.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://eeqk3fvjwg31
|
||||
1
scripts/systems/effects/SlownessEffect.cs.uid
Normal file
1
scripts/systems/effects/SlownessEffect.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dyc7fc5bfkdii
|
||||
Loading…
Add table
Add a link
Reference in a new issue