Cards::Card
Inherits JSON::Serializable < Reference < Object
Constants
DROP_SHADOW = 1
HEIGHT = 88
HEIGHT_DEPTH = 0.666_f32
MARGIN = 10
MOVEMENT_FRAMES = 16
WIDTH = 64
bicycle card size in mm from https://en.wikipedia.org/wiki/Standard_52-card_deck#Size_of_the_cards
Constructors
new(rank : Cards::Rank, suit : Cards::Suit, flipped : Bool = true, position : Game::Vector = Game::Vector.new)
Sourcenew(pull : JSON::PullParser)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceClass methods
height
Sourceheight_depth
Sourcemargin
Sourcewidth
SourceInstance methods
clone
Sourcedraw(deck, screen_x = 0, screen_y = 0)
Sourcedraw_shadow(screen_x, screen_y)
Sourceflip
Sourceflipped=(flipped : Bool)
Sourceflipped?
Sourceheight
Sourceheight_depth
Sourcemouse_in?
Sourcemove(move_to : Game::Vector, frames = MOVEMENT_FRAMES)
Sourcemoved?
Sourcemoving?
Sourcename
Sourceposition
Sourceposition=(position : Game::Vector)
Sourcerank
Sourcerank=(rank : Rank)
Sourceshort_name
Sourcesuit
Sourcesuit=(suit : Suit)
Sourceto_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
update(frame_time)
Sourcex(*args, **options)
Sourcex(*args, **options, &)
Sourcex=(arg)
Sourcey(*args, **options)
Sourcey(*args, **options, &)
Sourcey=(arg)
Source