Game Development Reference
In-Depth Information
{GROUND,JUMP,FALL,JUMP_HOLD,AIM}
const float GUN_LASER_DISTANCE = 1000f;
public LineRenderer laser;
MouseLook _mouseLook;
7. Go to the Awake() and Start() functions and set them as in the following
highlighted code:
// Unity JavaScript user:
function Awake () {
_mouseLook = GetComponent.<MouseLook>();
}
function Start () {
_isAiming = false;
_mouseLook.enabled = false;
if (laser != null) {
laser.gameObject.SetActive(false);
}
}
// C# user:
void Awake () {
_mouseLook = GetComponent<MouseLook>();
}
void Start () {
_isAiming = false;
_mouseLook.enabled = false;
if (laser != null) {
laser.gameObject.SetActive(false);
Search WWH ::




Custom Search