main
Elijah Voigt 2 months ago
parent 0800c56c12
commit 3779e1fb17

3
.gitignore vendored

@ -14,3 +14,6 @@ VERSION
# Generated MONOLOGUES list for wasm build # Generated MONOLOGUES list for wasm build
assets/trees/MONOLOGUES assets/trees/MONOLOGUES
# Blender temp file(s)
*.blend1

Binary file not shown.

BIN
assets/flappy/background-city.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/flappy/background-clouds.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/flappy/bird.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/flappy/ceiling.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/flappy/ground.png (Stored with Git LFS)

Binary file not shown.

BIN
assets/flappy/pipe.png (Stored with Git LFS)

Binary file not shown.

@ -201,11 +201,11 @@ impl Tape {
fn init_bird(mut commands: Commands, bird_assets: Res<BirdAssets>) { fn init_bird(mut commands: Commands, bird_assets: Res<BirdAssets>) {
let name = Name::new("bird"); let name = Name::new("bird");
let t = Transform::from_xyz(0.0, 0.0, 0.0).with_scale(Vec3::splat(50.0)); let t = Transform::from_xyz(0.0, 0.0, 0.0).with_scale(Vec3::new(62.5, 50.0, 50.0));
let physics = ( let physics = (
RigidBody::Static, RigidBody::Static,
Collider::rectangle(1.0, 1.2), Collider::rectangle(1.0, 1.0),
Mass(10.0), Mass(10.0),
ExternalImpulse::default().with_persistence(false), ExternalImpulse::default().with_persistence(false),
MaxLinearSpeed(500.0), MaxLinearSpeed(500.0),
@ -318,8 +318,8 @@ fn populate_ground(
ground_assets.mesh.clone(), ground_assets.mesh.clone(),
Name::new("ground"), Name::new("ground"),
RigidBody::Static, RigidBody::Static,
Collider::rectangle(1.0, 1.0), Collider::rectangle(1.0, 0.75),
Transform::from_xyz(100.0 * (*idx) as f32, -300.0, -1.0).with_scale(Vec3::splat(100.0)), Transform::from_xyz(100.0 * (*idx) as f32, -275.0, -1.0).with_scale(Vec3::splat(100.0)),
)); ));
} }
@ -336,7 +336,7 @@ fn populate_ceiling(
ceiling_assets.mesh.clone(), ceiling_assets.mesh.clone(),
Name::new("ceiling"), Name::new("ceiling"),
RigidBody::Static, RigidBody::Static,
Collider::rectangle(1.0, 1.0), Collider::rectangle(1.0, 0.75),
Transform::from_xyz(100.0 * (*idx) as f32, 300.0, -3.0).with_scale(Vec3::splat(100.0)), Transform::from_xyz(100.0 * (*idx) as f32, 300.0, -3.0).with_scale(Vec3::splat(100.0)),
)); ));
} }
@ -473,14 +473,14 @@ fn init_assets(
ground_assets.material = MeshMaterial2d(materials.add(ColorMaterial { ground_assets.material = MeshMaterial2d(materials.add(ColorMaterial {
texture: Some(server.load("flappy/ground.png")), texture: Some(server.load("flappy/ground.png")),
color: Srgba::new(0.1, 0.1, 0.1, 1.0).into(), color: GREEN.into(),
..default() ..default()
})); }));
ground_assets.mesh = Mesh2d(meshes.add(Rectangle::new(1.0, 1.0))); ground_assets.mesh = Mesh2d(meshes.add(Rectangle::new(1.0, 1.0)));
ceiling_assets.material = MeshMaterial2d(materials.add(ColorMaterial { ceiling_assets.material = MeshMaterial2d(materials.add(ColorMaterial {
texture: Some(server.load("flappy/ceiling.png")), texture: Some(server.load("flappy/ceiling.png")),
color: Srgba::new(0.1, 0.1, 0.1, 1.0).into(), color: FIRE_BRICK.into(),
..default() ..default()
})); }));
ceiling_assets.mesh = Mesh2d(meshes.add(Rectangle::new(1.0, 0.777))); ceiling_assets.mesh = Mesh2d(meshes.add(Rectangle::new(1.0, 0.777)));
@ -742,7 +742,7 @@ fn init_background(
{ {
let material = MeshMaterial2d(materials.add(ColorMaterial { let material = MeshMaterial2d(materials.add(ColorMaterial {
texture: Some(server.load("flappy/background-city.png")), texture: Some(server.load("flappy/background-city.png")),
color: Srgba::new(0.3, 0.3, 0.3, 1.0).into(), color: LIGHT_GREY.with_alpha(0.8).into(),
alpha_mode: AlphaMode2d::Blend, alpha_mode: AlphaMode2d::Blend,
..default() ..default()
})); }));
@ -760,7 +760,7 @@ fn init_background(
{ {
let material = MeshMaterial2d(materials.add(ColorMaterial { let material = MeshMaterial2d(materials.add(ColorMaterial {
texture: Some(server.load("flappy/background-clouds.png")), texture: Some(server.load("flappy/background-clouds.png")),
color: Srgba::new(0.2, 0.2, 0.2, 1.0).into(), color: WHITE_SMOKE.with_alpha(0.8).into(),
alpha_mode: AlphaMode2d::Blend, alpha_mode: AlphaMode2d::Blend,
..default() ..default()
})); }));

Loading…
Cancel
Save