You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AntonioJuanPonce edited this page Feb 3, 2017
·
1 revision
Responsibility's:
Have a 'x' and 'y' value of the type double. Used to
simulate a camera by subtracting 'x' of the camera from
'x' of the location of the graphics on screen. Same as
for 'y'.
Notes:
All values in camera are static.
Dependency's:
Requires a the NPC 'focus' to be set by another class before
the update(); method can be called.
Requires the doubles 'x' and 'y' to be set by another class before
the update(); method can be called.
Method's:
Update();
Have the camera change it location by .02 'x' units and .02 'y'
units towards the location of the 'follow' NPC if the 'follow'
NPC is too close to the edge of the screen.
Too close to the edge of the screen is defined by the doubles:
* x_border_neg
* x_border_pos
* y_border_neg
* y_border_pos