コード例 #1
0
    public override void OnInit()
    {
        ator.SetBool("jumping", false);
        ladderPos = LadderPos.NONE;

        base.OnInit();
    }
コード例 #2
0
    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;
        }
    }
コード例 #3
0
ファイル: OnLadderSate.cs プロジェクト: cire4321/2D_UF2
 public OnLadderState(FinnController finn, LadderPos ladderPos, float ladderStep) : base(finn)
 {
     this.ladderPos  = ladderPos;
     this.ladderStep = ladderStep;
 }