#================================================================ #================================================================ # XP - Piano # #Autor: Avenger_B7 #Data: 30/10/2013 #================================================================ #================================================================ class Play_Piano def tocar # Caso aperte A tocar nota dó. if Input.trigger?(Input::X) @nota_do = Sprite.new @nota_do.bitmap = RPG::Cache.picture("Dó") @nota_do.x = 200 @nota_do.y = 100 Audio.se_play("Audio/SE/do") end # Caso aperte Y tocar nota ré. if Input.trigger?(Input::Y) @nota_re = Sprite.new @nota_re.bitmap = RPG::Cache.picture("Ré") @nota_re.x = 200 @nota_re.y = 100 Audio.se_play("Audio/SE/re") end # Caso aperte Z tocar nota mi. if Input.trigger?(Input::Z) @nota_mi = Sprite.new @nota_mi.bitmap = RPG::Cache.picture("Mi") @nota_mi.x = 200 @nota_mi.y = 100 Audio.se_play("Audio/SE/mi") end # Caso aperte Esquerda tocar nota fá. if Input.trigger?(Input::LEFT) @nota_fa = Sprite.new @nota_fa.bitmap = RPG::Cache.picture("Fá") @nota_fa.x = 200 @nota_fa.y = 100 Audio.se_play("Audio/SE/fa") end # Caso aperte Cima tocar nota sol. if Input.trigger?(Input::UP) @nota_sol = Sprite.new @nota_sol.bitmap = RPG::Cache.picture("Sol") @nota_sol.x = 200 @nota_sol.y = 100 Audio.se_play("Audio/SE/sol") end # Caso aperte Direita tocar nota lá. if Input.trigger?(Input::RIGHT) @nota_la = Sprite.new @nota_la.bitmap = RPG::Cache.picture("Lá") @nota_la.x = 200 @nota_la.y = 100 Audio.se_play("Audio/SE/la") end # Caso aperte Baixo tocar nota si. if Input.trigger?(Input::DOWN) @nota_si = Sprite.new @nota_si.bitmap = RPG::Cache.picture("Si") @nota_si.x = 200 @nota_si.y = 100 Audio.se_play("Audio/SE/si") end # Caso aperte X, Esc ou 0 desligar a switch de ID 1. if Input.trigger?(Input::B) $game_switches[1] = false end end end