Skip to content

Commit

Permalink
- Rebalanced Penguin RNG again.
Browse files Browse the repository at this point in the history
- Changed sprite rendering priority system to render first to last again instead doing it in reverse order. Sprite class now have a property named Priority which indicates its rendering priority in its containing layer, lower values indicates lower priority and therefore will be rendered first, while high values indicate higher priority, rendering last and thus displaying ahead of lower priority sprites. New methods named BringToFront and SendToBack has been added to Sprite class to, these methods can be called to make sprite with highest or lowest priority, respectively.

- Baed on the update above, an update was needed in the class AxeMaxTrunk to keep it rendering always with lower priority.
  • Loading branch information
sharivan committed Mar 27, 2023
1 parent 2a23d8f commit ed9e839
Show file tree
Hide file tree
Showing 48 changed files with 474 additions and 52 deletions.
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Amenhopper/Amenhopper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Amenhopper;

public class Amenhopper : Enemy
{
}
2 changes: 2 additions & 0 deletions XSharp/Engine/Entities/Enemies/AxeMax/AxeMaxTrunk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ protected override void OnSpawn()
AutoAdjustOnTheFloor = false;
CollisionData = CollisionData.SOLID;

SendToBack();

if (TrunkBase.FirstRegenerating)
{
State = AxeMaxTrunkState.IDLE;
Expand Down
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/BallDeVoux.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies;

public class BallDeVoux : Enemy
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/BattonM501.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies;

public class BattonM501 : Enemy
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.ArmoredArmadillo;

public class ArmoredArmadillo : Boss
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.BoomerKuwanger;

public class BoomerKuwanger : Boss
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Bosses/Bosspider/Bosspider.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.Bosspider;

public class Bosspider : Boss
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Bosses/Bosspider/Petitpider.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.Bosspider;

public class Petitpider : Enemy
{
}
48 changes: 28 additions & 20 deletions XSharp/Engine/Entities/Enemies/Bosses/ChillPenguin/ChillPenguin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -553,19 +553,19 @@ private void OnIdle(EntityState state, long frameCounter)
{
switch (value)
{
case >= 0 and < 2:
case >= 0 and < 4:
State = ChillPenguinState.SLIDING;
break;

case >= 2 and < 4:
case >= 4 and < 8:
State = ChillPenguinState.SHOOTING_ICE;
break;

case >= 4 and < 6:
case >= 8 and < 10:
State = ChillPenguinState.JUMPING;
break;

case >= 6 and < 12:
case >= 10 and < 12:
if (AtLeastOneSculpturesAlive())
State = ChillPenguinState.HANGING;
else
Expand All @@ -592,19 +592,19 @@ private void OnIdle(EntityState state, long frameCounter)
{
switch (value)
{
case >= 0 and < 2:
case >= 0 and < 4:
State = ChillPenguinState.SLIDING;
break;

case >= 2 and < 4:
case >= 4 and < 6:
State = ChillPenguinState.SHOOTING_ICE;
break;

case >= 4 and < 6:
case >= 6 and < 10:
State = ChillPenguinState.JUMPING;
break;

case >= 6 and < 14:
case >= 10 and < 14:
if (AtLeastOneSculpturesAlive())
State = ChillPenguinState.HANGING;
else
Expand Down Expand Up @@ -639,11 +639,11 @@ private void OnIdle(EntityState state, long frameCounter)
State = ChillPenguinState.SHOOTING_ICE;
break;

case >= 6 and < 8:
case >= 6 and < 10:
State = ChillPenguinState.JUMPING;
break;

case >= 8 and < 12:
case >= 10 and < 12:
if (AtLeastOneSculpturesAlive())
State = ChillPenguinState.HANGING;
else
Expand Down Expand Up @@ -674,11 +674,11 @@ private void OnIdle(EntityState state, long frameCounter)
State = ChillPenguinState.SLIDING;
break;

case >= 4 and < 6:
case >= 4 and < 8:
State = ChillPenguinState.SHOOTING_ICE;
break;

case >= 6 and < 12:
case >= 8 and < 12:
if (AtLeastOneSculpturesAlive())
State = ChillPenguinState.HANGING;
else
Expand Down Expand Up @@ -713,7 +713,11 @@ private void OnIdle(EntityState state, long frameCounter)
State = ChillPenguinState.SHOOTING_ICE;
break;

case >= 6 and < 12:
case >= 6 and < 10:
State = ChillPenguinState.JUMPING;
break;

case >= 10 and < 12:
if (AtLeastOneSculpturesAlive())
State = ChillPenguinState.HANGING;
else
Expand Down Expand Up @@ -741,15 +745,19 @@ private void OnIdle(EntityState state, long frameCounter)
{
switch (value)
{
case >= 0 and < 2:
case >= 0 and < 4:
State = ChillPenguinState.SLIDING;
break;

case >= 2 and < 6:
case >= 4 and < 8:
State = ChillPenguinState.SHOOTING_ICE;
break;

case >= 6 and < 12:
case >= 8 and < 10:
State = ChillPenguinState.JUMPING;
break;

case >= 10 and < 12:
if (AtLeastOneSculpturesAlive())
State = ChillPenguinState.HANGING;
else
Expand All @@ -776,19 +784,19 @@ private void OnIdle(EntityState state, long frameCounter)
{
switch (value)
{
case >= 0 and < 2:
case >= 0 and < 4:
State = ChillPenguinState.SLIDING;
break;

case >= 2 and < 4:
case >= 4 and < 8:
State = ChillPenguinState.SHOOTING_ICE;
break;

case >= 4 and < 8:
case >= 8 and < 10:
State = ChillPenguinState.JUMPING;
break;

case >= 8 and < 12:
case >= 10 and < 12:
if (AtLeastOneSculpturesAlive())
State = ChillPenguinState.HANGING;
else
Expand Down
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Bosses/DRex/DRex.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.DRex;

public class DRex : Boss
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.FlameMammoth;

public class FlameMammoth : Boss
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.LauchOctupus;

public class LauchOctupus : Boss
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.RangdaBangda;

public class RangdaBangda : Boss
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Bosses/Sigma/CapSigma.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.Sigma;

public class CapSigma : Boss
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Bosses/Sigma/JediSigma.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.Sigma;

public class JediSigma : Boss
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Bosses/Sigma/KaiserSigma.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.Sigma;

public class KaiserSigma : Boss
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Bosses/Sigma/NeoSigma.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.Sigma;

public class NeoSigma : Boss
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Bosses/Sigma/SigmaVirus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.Sigma;

public class SigmaVirus : Boss
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Bosses/Sigma/WolfSigma.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.Sigma;

public class WolfSigma : Boss
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.SparkMandrill;

public class SparkMandrill : Boss
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.StingChameleon;

public class StingChameleon : Boss
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.StormEagle;

public class StormEagle : Boss
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.Velguarder;

public class Velguarder : Boss
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Bosses/Vile/Vile.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Bosses.Vile;

public class Vile : Boss
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/CragMan.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies;

public class CragMan : Enemy
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Creeper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies;

public class Creeper : Enemy
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Crusher/Crusher.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Crusher;

public class Crusher : Enemy
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.DodgeBlaster;

public class DodgeBlasterShot : Enemy
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Flamer/Flamer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Flamer;

public class Flamer : Enemy
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Gulpfer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies;

public class Gulpfer : Enemy
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Hoganmer/Hoganmer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Hoganmer;

public class Hoganmer : Enemy
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Hotarion/Hotarion.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.Hotarion;

public class Hotarion : Enemy
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Iworm.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies;

public class Iworm : Enemy
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/LadderYadder.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies;

public class LadderYadder : Enemy
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/MadPecker.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies;

public class MadPecker : Enemy
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/MetalWing.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies;

public class MetalWing : Enemy
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/MetallC15/MetallC15.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies.MetallC15;

public class MetallC15 : Enemy
{
}
5 changes: 5 additions & 0 deletions XSharp/Engine/Entities/Enemies/Planty.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace XSharp.Engine.Entities.Enemies;

public class Planty : Enemy
{
}
Loading

0 comments on commit ed9e839

Please sign in to comment.