public void Start() { rb2d = GetComponent <Rigidbody2D>(); land = GetComponent <RunAround>(); ladder = GetComponent <ClimbLadder>(); land.Init(this); ladder.Init(this); heroMover = land; }
public void TouchingLadder(float x) { if (heroMover.Equals(ladder)) { return; } if (vertical_input != 0) { heroMover = ladder; heroMover.Init(this, x); } }
public void NotTouchingLadder() { heroMover = land; }