void Start() { myController = GetComponent <PlayerController>(); rollingScript = GetComponent <PlayerRolling>(); anim = transform.GetChild(0).GetChild(0).GetComponent <Animator>(); legsAnim = transform.GetChild(0).GetChild(0).GetChild(0).GetComponent <Animator>(); }
void Start() { flipTransform = transform.GetChild(0); anim = flipTransform.GetChild(0).GetComponent <Animator>(); legsAnim = flipTransform.GetChild(0).GetChild(0).GetComponent <Animator>(); upperSr = flipTransform.GetChild(0).GetComponent <SpriteRenderer>(); lowerSr = flipTransform.GetChild(0).GetChild(0).GetComponent <SpriteRenderer>(); defaultColor = upperSr.color; genericController = GetComponent <CollisionsController>(); myController = GetComponent <PlayerController>(); rollingScript = GetComponent <PlayerRolling>(); //kinematics gravity = -(2 * maxJumpHeight) / Mathf.Pow(timeToJumpApex, 2); maxJumpVelocity = Mathf.Abs(gravity) * timeToJumpApex; minJumpVelocity = Mathf.Sqrt(2 * Mathf.Abs(gravity) * minJumpHeight); print("Gravity: " + gravity + " Jump Velocity: " + maxJumpVelocity); }
void Start() { player = GetComponent <Player>(); playerRolling = GetComponent <PlayerRolling>(); myRigidbody = GetComponent <Rigidbody>(); }
// Use this for initialization void Start() { player = GetComponent <Player>(); rollScript = GetComponent <PlayerRolling>(); attackScript = GetComponent <PlayerSwordAttack>(); }
void Start() { player = GetComponent <Player>(); playerRolling = GetComponent <PlayerRolling>(); }