December 2014
Beginner
384 pages
11h 15m
English
This section contains the final scripts that are used to control the player’s movement along with tracking health, coins, and similar values. You’ll find the following scripts here:
Listing A.1: The PlayerController Script
Listing A.2: The PlayerStats Script
Listing A.1 The PlayerController Script
#pragma strictprivate var Constants : Constants = new Constants();@HideInInspectorpublic var isFacingRight : boolean = true;@HideInInspectorpublic var isGrounded : boolean = false;@HideInInspectorpublic var ...