Add proper meshes & materials for game objects
The asteroid circles have been replaced with polylines. I was going to do a regular triangle mesh, but I don't want to figure out GLTF loading or manually chunking the points into convex hulls. Asteroid materials are now all populated and their GameAsset getters are indexed correctly. I'm not sold on the size based color selection. Later, I think I'll either remove the extra colors or let each of them randomly apply to any asteroid. The bullet is now a short line segment. Apparently I already wired in the rotation logic, so pointing it correctly out of the ship already works.
This commit is contained in:
@@ -11,9 +11,9 @@ mod resources;
|
||||
mod widgets;
|
||||
|
||||
use crate::config::{
|
||||
ASTEROID_SMALL_COLOR, BACKGROUND_COLOR, BULLET_COLOR, BULLET_LIFETIME, BULLET_SPEED,
|
||||
PLAYER_SHIP_COLOR, SHIP_ROTATION, SHIP_THRUST, SHIP_THRUSTER_COLOR_ACTIVE,
|
||||
SHIP_THRUSTER_COLOR_INACTIVE,
|
||||
ASTEROID_LARGE_COLOR, ASTEROID_MEDIUM_COLOR, ASTEROID_SMALL_COLOR, BACKGROUND_COLOR,
|
||||
BULLET_COLOR, BULLET_LIFETIME, BULLET_SPEED, PLAYER_SHIP_COLOR, SHIP_ROTATION, SHIP_THRUST,
|
||||
SHIP_THRUSTER_COLOR_ACTIVE, SHIP_THRUSTER_COLOR_INACTIVE,
|
||||
};
|
||||
use crate::machinery::AsteroidSpawner;
|
||||
use crate::objects::{Bullet, Ship, Weapon};
|
||||
|
||||
Reference in New Issue
Block a user