示例#1
0
    public void Start()
    {
        rb2d = GetComponent <Rigidbody2D>();

        land   = GetComponent <RunAround>();
        ladder = GetComponent <ClimbLadder>();
        land.Init(this);
        ladder.Init(this);

        heroMover = land;
    }
示例#2
0
    public void TouchingLadder(float x)
    {
        if (heroMover.Equals(ladder))
        {
            return;
        }

        if (vertical_input != 0)
        {
            heroMover = ladder;
            heroMover.Init(this, x);
        }
    }
示例#3
0
 public void NotTouchingLadder()
 {
     heroMover = land;
 }