mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
go through colours in order rather than randomly
This commit is contained in:
parent
64308a993c
commit
1cbc371d3e
|
@ -189,7 +189,6 @@ pub fn no_game(mut gba: crate::Gba) -> ! {
|
||||||
let vblank = VBlank::get();
|
let vblank = VBlank::get();
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let mut rng = crate::rng::RandomNumberGenerator::new();
|
|
||||||
time += time_delta;
|
time += time_delta;
|
||||||
time %= 1;
|
time %= 1;
|
||||||
let letters: Vec<ObjectUnmanaged> = letter_positons
|
let letters: Vec<ObjectUnmanaged> = letter_positons
|
||||||
|
@ -197,11 +196,10 @@ pub fn no_game(mut gba: crate::Gba) -> ! {
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.map(|(idx, position)| {
|
.map(|(idx, position)| {
|
||||||
let time = time + Num::<i32, 8>::new(idx as i32) / 128;
|
let time = time + Num::<i32, 8>::new(idx as i32) / 128;
|
||||||
*position + Vector2D::new(time.sin(), time.cos()) * 10
|
(idx, *position + Vector2D::new(time.sin(), time.cos()) * 10)
|
||||||
})
|
})
|
||||||
.map(|pos| {
|
.map(|(idx, pos)| {
|
||||||
let mut obj =
|
let mut obj = ObjectUnmanaged::new(squares[idx % squares.len()].clone());
|
||||||
ObjectUnmanaged::new(squares[rng.gen() as usize % squares.len()].clone());
|
|
||||||
obj.show().set_position(pos.floor());
|
obj.show().set_position(pos.floor());
|
||||||
obj
|
obj
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue