render hand at index 0
This commit is contained in:
parent
a6079103a4
commit
f4c4339204
7 changed files with 56 additions and 59 deletions
|
|
@ -1,6 +1,9 @@
|
|||
use bevy::prelude::*;
|
||||
|
||||
use crate::tiles::{self, *};
|
||||
use crate::{
|
||||
game::player::MainPlayer,
|
||||
tiles::{self, *},
|
||||
};
|
||||
|
||||
pub mod hand;
|
||||
pub mod player;
|
||||
|
|
@ -24,7 +27,7 @@ impl Plugin for Riichi {
|
|||
.add_systems(Startup, tiles::init_tiles)
|
||||
.init_state::<GameState>()
|
||||
.add_systems(OnEnter(GameState::Setup), (wall::build_wall, hand::deal_hands, setup_done).chain())
|
||||
.add_systems(Update, (hand::sort_hand).run_if(in_state(GameState::Play)))
|
||||
.add_systems(Update, (hand::sort_hands).run_if(in_state(GameState::Play)))
|
||||
// semicolon stopper
|
||||
;
|
||||
}
|
||||
|
|
@ -79,7 +82,7 @@ pub(crate) fn init_match(
|
|||
player_count,
|
||||
});
|
||||
|
||||
let players = (1..=player_count)
|
||||
let players = (2..=player_count)
|
||||
.map(|i| {
|
||||
(
|
||||
player::Player {
|
||||
|
|
@ -90,6 +93,13 @@ pub(crate) fn init_match(
|
|||
})
|
||||
.collect::<Vec<_>>();
|
||||
commands.spawn_batch(players);
|
||||
let main_player = (
|
||||
player::Player {
|
||||
name: format!("Player {}", 1),
|
||||
},
|
||||
player::Points(starting),
|
||||
);
|
||||
commands.spawn((main_player, MainPlayer));
|
||||
|
||||
// *compass = Compass {
|
||||
// prevalent_wind: Wind::Ton,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue