mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: byte => u8
This commit is contained in:
@ -5,8 +5,8 @@ import rand
|
||||
|
||||
pub fn random_color() gx.Color {
|
||||
return gx.Color{
|
||||
r: rand.byte()
|
||||
g: rand.byte()
|
||||
b: rand.byte()
|
||||
r: rand.u8()
|
||||
g: rand.u8()
|
||||
b: rand.u8()
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ pub fn (particle Particle) draw(mut ctx gg.Context) {
|
||||
|
||||
pub fn (mut particle Particle) tick(mut rocket Rocket, mut ctx gg.Context) {
|
||||
particle.lifespan -= get_params().age_rate
|
||||
particle.color.a = byte(particle.lifespan)
|
||||
particle.color.a = u8(particle.lifespan)
|
||||
|
||||
if particle.lifespan <= 0 {
|
||||
rocket.dead = true
|
||||
|
Reference in New Issue
Block a user