void Start() { groundPos = transform.position; groundHeight = transform.position.y; maxJumpHeight = transform.position.y + maxJumpHeight; defaultSpeed = bgScript.GetSpeed(); curMovingUpTime = movingUpTime; }
void Start() { groundPos = transform.position; groundHeight = transform.position.y; maxJumpHeight = transform.position.y + maxJumpHeight; defaultSpeed = bgScript.GetSpeed(); curMovingUpTime = movingUpTime; jump = GetComponent <AudioSource>(); }