public override void OnInit() { ator.SetBool("jumping", false); ladderPos = LadderPos.NONE; base.OnInit(); }
public override void OnTriggerEnter(Collider2D collision) { base.OnTriggerEnter(collision); if (collision.gameObject.tag == "BottomLadder") { ladderStep = (collision as CircleCollider2D).radius * 2 * 1.05f; ladderPos = LadderPos.BOTTOM; } if (collision.gameObject.tag == "TopLadder") { ladderStep = (collision as CircleCollider2D).radius * 2 * 1.05f; ladderPos = LadderPos.TOP; } }
public OnLadderState(FinnController finn, LadderPos ladderPos, float ladderStep) : base(finn) { this.ladderPos = ladderPos; this.ladderStep = ladderStep; }