args.game.timer ||=300 if args.game.tick_count % args.game.timer == 0 args.game.x = rand * 1279 args.game.y = rand * 719 args.game.timer -= 10 end
Recent community posts
In the meantime, you could try putting an offset on the rect.
if args.state.mob_sprite.intersects_rect? [args.state.player_sprite.x+20,args.state.player_sprite.y+10,args.state.player_sprite.w-40,args.state.player_sprite.h-20]
The default behavior for OGG is to loop atm. If you use a program like Audacity to make it a WAV it will only play once. I'm sure they will add the ability to set either to loop in the future. For now, background music loop use ogg, sound effects use wav.