Game Development Reference
In-Depth Information
if (DistanceMag > AmmoRange)
{
// Ammo is Spent so Reset Ammunition to ready to use status.
m_WeaponClip[i].Reset();
}
}
}
}
Figure 7-2 shows the player's weapon being fired. The green cube in the center of the picture is the
player's ammunition from the weapon.
Figure 7-2. Player's weapon fired
Creating the Explosions
The explosions for our game will consist of many triangular polygons. The key classes for our explosion
are the PolyParticleEx class, which represents the particles, and the SphericalPolygonExplosion class,
which contains the particles that will make up our explosion.
Creating the PolyParticleEx Class
The PolyParticleEx class represents the particles of the explosion we want to create, along with
functions to manage and manipulate the particle.
 
Search WWH ::




Custom Search