1
0
Fork 0

Dummy hand drawing

This commit is contained in:
Alexey 2025-02-16 21:29:52 +03:00
commit 19f9dc6e8d
6 changed files with 31 additions and 5 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
/target
tags

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View file

@ -2,9 +2,13 @@ use bevy::prelude::*;
#[derive(Component)]
pub struct Hand {
pub name: String,
pub cards: Vec<Entity>,
pub animals: Vec<Entity>
pub name: String
}
impl Hand {
pub fn new(name: String) -> Hand {
Hand { name }
}
}
#[derive(Component)]

View file

@ -1,3 +1,20 @@
use bevy::prelude::*;
use crate::hand::Hand;
pub mod hand;
pub mod animal;
pub mod properties;
pub fn setup(
mut commands: Commands,
mut meshes: ResMut<Assets<Mesh>>,
mut materials: ResMut<Assets<ColorMaterial>>
) {
commands.spawn(Camera2d);
commands.spawn((
Hand::new("Player1".to_string()),
Transform::from_xyz(0., -300., 0.),
Mesh2d(meshes.add(Rectangle::new(100., 100.))),
MeshMaterial2d(materials.add(ColorMaterial::from_color(Srgba::rgb(0.5, 0.5, 0.5))))
));
}

View file

@ -1,8 +1,12 @@
use bevy::prelude::*;
use evolution_rs::properties::plugin::BasePropertiesPlugin;
use evolution_rs::{
properties::plugin::BasePropertiesPlugin,
setup
};
fn main() {
App::new()
.add_plugins((DefaultPlugins,BasePropertiesPlugin))
.add_systems(Startup, setup)
.run();
}