// Use this for initialization void Start() { Cursor.visible = false; values = GameObject.FindGameObjectWithTag("Values"); stored = values.GetComponent <StoredValues>(); hud = gameObject.GetComponent <HUD>(); run = GetComponent <Run>(); squat = GetComponent <Squat>(); jump = GetComponent <Jump>(); screen = GameObject.FindGameObjectWithTag("ScreenOverlay"); overlay = screen.GetComponent <ScreenOverlay>(); finish = GameObject.FindGameObjectWithTag("Finish"); rightBoundry = 0.4f; leftBoundry = -0.4f; moveSideways = 7.5f; moveForward = 0.0f; moveSpeed = 0.125f; combinedSpeed = 0.0f; // vertical normal vector for hip angle hipUp = new Vector3(0.0f, 1.0f, 0.0f); keepRunning = false; begin = false; }
// Use this for initialization void Start() { head = GameObject.FindGameObjectWithTag("Head"); rend = GetComponent<MeshRenderer>(); headRend = head.GetComponent<MeshRenderer>(); movement = GetComponent<Movement>(); squat = GetComponent<Squat>(); isColliding = false; }
// Use this for initialization void Start() { head = GameObject.FindGameObjectWithTag("Head"); rend = GetComponent <MeshRenderer>(); headRend = head.GetComponent <MeshRenderer>(); movement = GetComponent <Movement>(); squat = GetComponent <Squat>(); isColliding = false; }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); movement = player.GetComponent <Movement>(); flash = player.GetComponent <FlashPlayer>(); squat = player.GetComponent <Squat>(); jump = player.GetComponent <Jump>(); hud = player.GetComponent <HUD>(); bounds = new Bounds(new Vector3(transform.position.x, transform.position.y, transform.position.z), new Vector3(transform.localScale.x, transform.localScale.y, transform.localScale.z)); }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); movement = player.GetComponent<Movement>(); flash = player.GetComponent<FlashPlayer>(); squat = player.GetComponent<Squat>(); jump = player.GetComponent<Jump>(); hud = player.GetComponent<HUD>(); bounds = new Bounds(new Vector3(transform.position.x, transform.position.y, transform.position.z), new Vector3(transform.localScale.x, transform.localScale.y, transform.localScale.z)); }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); movement = player.GetComponent <Movement>(); squat = player.GetComponent <Squat>(); jump = player.GetComponent <Jump>(); flash = player.GetComponent <FlashPlayer>(); head = GameObject.FindGameObjectWithTag("Head"); headRend = head.GetComponent <MeshRenderer>(); rend = gameObject.GetComponent <MeshRenderer>(); children = gameObject.GetComponentsInChildren <MeshRenderer>(); bounds = new Bounds(new Vector3(transform.position.x, transform.position.y, transform.position.z), new Vector3(transform.localScale.x, transform.localScale.y, transform.localScale.z)); }
// Use this for initialization void Start() { movement = gameObject.GetComponent <Movement>(); squat = gameObject.GetComponent <Squat>(); values = GameObject.FindGameObjectWithTag("Values"); stored = values.GetComponent <StoredValues>(); playerHeight = 1.0f; bottomDif = 0.0f; floorHeight = 1.0f; maxJumpHeight = 3.5f; jumpSpeed = 0.25f; fallSpeed = 0.175f; jumpThreshold = 2.0f; lowestFoot = stored.lowestFoot; isJumping = false; reachedJumpTop = false; }
// Use this for initialization void Start() { movement = gameObject.GetComponent<Movement>(); squat = gameObject.GetComponent<Squat>(); values = GameObject.FindGameObjectWithTag("Values"); stored = values.GetComponent<StoredValues>(); playerHeight = 1.0f; bottomDif = 0.0f; floorHeight = 1.0f; maxJumpHeight = 3.5f; jumpSpeed = 0.25f; fallSpeed = 0.175f; jumpThreshold = 2.0f; lowestFoot = stored.lowestFoot; isJumping = false; reachedJumpTop = false; }
// Use this for initialization void Start() { Cursor.visible = false; values = GameObject.FindGameObjectWithTag("Values"); stored = values.GetComponent<StoredValues>(); hud = gameObject.GetComponent<HUD>(); run = GetComponent<Run>(); squat = GetComponent<Squat>(); jump = GetComponent<Jump>(); screen = GameObject.FindGameObjectWithTag("ScreenOverlay"); overlay = screen.GetComponent<ScreenOverlay>(); finish = GameObject.FindGameObjectWithTag("Finish"); rightBoundry = 0.4f; leftBoundry = -0.4f; moveSideways = 7.5f; moveForward = 0.0f; moveSpeed = 0.125f; combinedSpeed = 0.0f; // vertical normal vector for hip angle hipUp = new Vector3(0.0f, 1.0f, 0.0f); keepRunning = false; begin = false; }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); movement = player.GetComponent<Movement>(); squat = player.GetComponent<Squat>(); jump = player.GetComponent<Jump>(); flash = player.GetComponent<FlashPlayer>(); head = GameObject.FindGameObjectWithTag("Head"); headRend = head.GetComponent<MeshRenderer>(); rend = gameObject.GetComponent<MeshRenderer>(); children = gameObject.GetComponentsInChildren<MeshRenderer>(); bounds = new Bounds(new Vector3(transform.position.x, transform.position.y, transform.position.z), new Vector3(transform.localScale.x, transform.localScale.y, transform.localScale.z)); }