Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///movimentos
- if (global.cima and no_piso) {vspeed -= 5 }
- if place_free(x, y+1) {
- vspeed = vspeed/2
- global.cima = false}
- if (global.direita and place_free(x + 4, y)) {
- x -= 10
- global.virado_direita = false
- global.virado_esquerda = false
- sprite_index = spr_andando
- image_xscale = -1
- image_speed = 3 }
- if (global.esquerda and place_free(x + 4, y)) {
- x += 10
- global.virado_direita = false
- global.virado_esquerda = false
- sprite_index = spr_andando
- image_xscale = +1
- image_speed = 3 }
- if global.virado_esquerda {
- sprite_index = spr_parado
- image_xscale = +1
- }
- if global.virado_direita {
- sprite_index = spr_parado
- image_xscale = -1
- }
- else{
- if place_free(x, y +2) {//se a area a 2 pixels estiver livre ele trocara a sprite para spr_pulo
- sprite_index = spr_pulo
- image_speed = 0.5
- }
- if !place_free(x, y +2) and sprite_index=spr_pulo{// se a area a 2 pixels estiver ocupada ele mudara a sprite
- sprite_index = spr_parado
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement