Skip to content

stillonearth/bevy_la_mesa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bevy_la_mesa

Plugin for building card-based games on bevy. Made during bevy jam #5

Screenshot 2024-08-06 125359

Versions

bevy_la_mesa bevy
0.07 0.14

Plugin Settings

// Setup card types and chip types

#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub enum ChipType;

#[derive(Default, Clone, Debug)]
pub struct Kard {
    pub card_type: CardType,
    pub filename: String,
}

impl CardMetadata for Kard {
    type Output = Kard;

    fn filename(&self) -> String {
        self.filename.clone()
    }
}

// Setup Plugin
app.add_plugins((LaMesaPlugin::<Kard, ChipType>::default(), ObjPlugin))
    .insert_resource(LaMesaPluginSettings {
        num_players: 2,
        hand_size: 5,
        back_card_path: "tarjetas/back.png".to_string(),
    });

Events

Event Descritpion
RenderDeck render deck on table
CardHover mouse card hover on
CardOut mouse card pointer off
CardPress press card
DeckShuffle shuffle deck of cards
DrawHand draw cards from deck to hard
PlaceCardOnTable place card from hand or deck on table
AlignCardsInHand align cards in hands spacially
PlaceCardOffTable remove card from table to deck
AlignChipsOnTable align chips on table

About

Card games for Bevy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages