Skip to content

Commit

Permalink
Merge pull request #63 from RubyCamp/add_master_key
Browse files Browse the repository at this point in the history
Add master key
  • Loading branch information
NAKKA-K authored Mar 9, 2018
2 parents 1d5cf05 + 790069a commit d0b3620
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/scenes/credit/director.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def play
draw
if $DEBUG
@button_sensor.update(ButtonSensor::LEFT_PIN); @button_sensor.update(ButtonSensor::RIGHT_PIN)
else
@button_sensor.update(ButtonSensor::RIGHT_PIN) # 運営操作用のマスターkey
end
@leng_sensor.update(LengSensor::LEFT_PIN); @leng_sensor.update(LengSensor::RIGHT_PIN)
update
Expand All @@ -31,6 +33,8 @@ def update
elsif @leng_sensor.down?(LengSensor::RIGHT_PIN) ||
@leng_sensor.down?(LengSensor::LEFT_PIN)
SceneMgr.move_to(:title)
elsif !$DEBUG && @button_sensor.down?(ButtonSensor::RIGHT_PIN) # 運営操作用のマスターkey
SceneMgr.move_to(:title)
end
end

Expand Down
4 changes: 4 additions & 0 deletions src/scenes/game/director.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ def play
draw
if $DEBUG
@button_sensor.update(ButtonSensor::LEFT_PIN); @button_sensor.update(ButtonSensor::RIGHT_PIN)
else
@button_sensor.update(ButtonSensor::RIGHT_PIN) # 運営操作用のマスターkey
end
@leng_sensor.update(LengSensor::LEFT_PIN); @leng_sensor.update(LengSensor::RIGHT_PIN)

Expand Down Expand Up @@ -159,6 +161,8 @@ def update
if @timer.stop?
SceneMgr.move_to(:result)
@timer.reset
elsif !$DEBUG && @button_sensor.down?(ButtonSensor::RIGHT_PIN) # 運営操作用のマスターkey
SceneMgr.move_to(:result)
end

if $DEBUG && @button_sensor.down?(ButtonSensor::RIGHT_PIN) ||
Expand Down
4 changes: 2 additions & 2 deletions src/scenes/game/matz.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def receive_present(present)
case present.class.status
when :ruby
SoundMgr.ruby_sound_play
30
20
when :castle
SoundMgr.castle_sound_play
10
Expand All @@ -49,7 +49,7 @@ def receive_present(present)
-20
when :cookie
SoundMgr.cookie_sound_play
-100
-30
end
@present_dy = (@@rate_y - present.y) / ((@@rate_x - present.x) / @present_dx) # 移動距離を計算します。
@presents.push(present.dup)
Expand Down
5 changes: 5 additions & 0 deletions src/scenes/result/director.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ def play
draw
if $DEBUG
@button_sensor.update(ButtonSensor::LEFT_PIN); @button_sensor.update(ButtonSensor::RIGHT_PIN)
else
@button_sensor.update(ButtonSensor::RIGHT_PIN) # 運営操作用のマスターkey
end

@leng_sensor.update(LengSensor::LEFT_PIN); @leng_sensor.update(LengSensor::RIGHT_PIN)
update
end
Expand All @@ -32,6 +35,8 @@ def update
elsif @leng_sensor.down?(LengSensor::RIGHT_PIN) ||
@leng_sensor.down?(LengSensor::LEFT_PIN)
SceneMgr.move_to(:credit)
elsif !$DEBUG && @button_sensor.down?(ButtonSensor::RIGHT_PIN) # 運営操作用のマスターkey
SceneMgr.move_to(:credit)
end
end

Expand Down
4 changes: 4 additions & 0 deletions src/scenes/title/director.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def play
draw
if $DEBUG
@button_sensor.update(ButtonSensor::LEFT_PIN); @button_sensor.update(ButtonSensor::RIGHT_PIN)
else
@button_sensor.update(ButtonSensor::RIGHT_PIN) # 運営操作用のマスターkey
end
@leng_sensor.update(LengSensor::LEFT_PIN); @leng_sensor.update(LengSensor::RIGHT_PIN)
update
Expand All @@ -30,6 +32,8 @@ def update
elsif @leng_sensor.down?(LengSensor::RIGHT_PIN) ||
@leng_sensor.down?(LengSensor::LEFT_PIN)
SceneMgr.move_to(:game)
elsif !$DEBUG && @button_sensor.down?(ButtonSensor::RIGHT_PIN) # 運営操作用のマスターkey
SceneMgr.move_to(:game)
end
end

Expand Down

0 comments on commit d0b3620

Please sign in to comment.