Beispiel #1
0
    private bool _check_is_grounded()
    {
        foreach (RayCast2D raycast in Raycasts.GetChildren())
        {
            if (raycast.IsColliding())
            {
                Godot.Object myCollider = raycast.GetCollider();
                if (myCollider.GetType() != typeof(Godot.TileMap))
                {//GD.Print("Ray collided with: "+ myCollider.GetType());
                 //Only kill if we haven't been hit before
                    if (hitstun == 0)
                    {
                        myCollider.Set("DEAD", true);
                    }
                }



                return(true);
            }
        }
        return(false);
    }