If you want to update or improve it, here it is.
And apologies for the variable and function names being in Spanish.
The cards can be images or font icons.
The key to the animations lies in these main variables.
B4X:
' DESTINATION
' The cards are dealt horizontally.
Dim Separacion As Float = 62dip
Dim AnchoMano As Float = pnlManoJugador.Width
Dim CentroMano As Float = pnlManoJugador.Left + AnchoMano / 2
Dim Total As Int = ManoJugador.Size
Dim Offset As Float = (PosicionMano - (Total - 1) / 2) * Separacion
Dim DestinoX As Float = CentroMano - CartaW / 2 + Offset
Dim DestinoY As Float = pnlManoJugador.Top + 5dip
' Flight parameters
Dim Duracion As Int = 650
Dim Pasos As Int = 40
Dim Altura As Float = 200
' Initial size
Dim EscalaInicial As Float = 0.70
NOTE:
And greetings to my friend @LucaMs, from Chile.
I didn't have time to turn it into a class, but I hope someone creates one.
' DESTINATION
'The cards are distributed horizontally.
Dim Separation As Float = 62dip
Dim HandWidth As Float = pnlPlayerHand.Width
Dim HandCenter As Float = pnlPlayerHand.Left + HandWidth / 2
Dim Total As Int = PlayerHand.Size
Dim Offset As Float = (HandPosition - (Total - 1) / 2) * Separation
Dim DestinationX As Float = HandCenter - CardW / 2 + Offset
Dim DestinationY Ace Float = pnlPlayerHand.Top + 5dip
' Flight parameters
Dim Duration As Int = 650
Dim Steps As Int = 40
Dim Height As Float = 200
'Initial size
Dim InitialScale As Float = 0.70
We left-handers hate that kind of card (real, paper ones).
Five-card poker. You know how a player slowly fans out the cards behind the first one; well, a left-handed player sees... four white corners at the top right, behind the first card
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.