Ejemplo n.º 1
0
    protected override void OnCollisionEnter2D(Collision2D col)
    {
        Walker walker = col.gameObject.GetComponent <Walker>();

        if (walker != null)
        {
            walker.ChangeLayer(MyFloor);
            walker.SetOnGround();
        }
    }
Ejemplo n.º 2
0
    protected virtual void OnCollisionEnter2D(Collision2D col)
    {
        Walker walker = col.gameObject.GetComponent <Walker>();

        if (walker != null)
        {
            walker.ChangeLayer(MyFloor);
            walker.OnLadder = false;
            walker.SetOnGround();
        }
    }