1
0
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:
Alexander Medvednikov
2022-04-15 14:58:56 +03:00
parent b49d873217
commit d4a0d6f73c
221 changed files with 1365 additions and 1365 deletions

View File

@ -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()
}
}

View File

@ -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