UnrealScript Game Programming Cookbook

(Chris Devlin) #1

HUD


216

How it works...


We start by declaring a few variables that we'll use on our crosshair. Within our
DrawWeaponCrosshair() function we actually draw the crosshair twice. The first
layer consists of a dark drop shadow which is slightly offset from the center of the
screen to give our crosshair some depth.


The second crosshair is the one the end user will actually see. We paint it right in the
center of the screen, which is exactly where our projectiles fire.

Free download pdf