Prototype: Isometric Roguelike Deck Builder, Unity C#
ApplyEffect is called when an enemy is hit with a Fire card. After the enemy gets hit with Fire five times, a burn is applied to the enemy.
Every machine can only have one of the pre-defined stat allocations. In a room when a stat machine is instantiated, it gets a random stat based on the other machines in the room so there are no duplicate machines.
Upon missing the chance of rolling a stat buff, the chance to get that buff increases for that machine. The player is guaranteed a stat every five rolls.
2D stealth game C++ Custom ECS Engine
The particle emitter keeps a vector of particles. The update function goes through and updates each lifetime of each particle separately, handling both displacement and deletion.
The header file (on the left-hand side) defines the contents of the particle structure.