Module: StoryTeller::PersistedStartupMove

Defined in:
lib/story_teller/player_character.rb

Overview

module PersistedStartupMove

Instance Method Summary collapse

Instance Method Details

#move(object, destination) ⇒ Object



81
82
83
84
85
86
87
88
89
90
91
# File 'lib/story_teller/player_character.rb', line 81

def move(object, destination)
  persisted_destination = StoryTeller::PersistedStartupLocation.peek

  if persisted_destination && startup_player_move?(object)
    destination = persisted_destination
    @location = persisted_destination
    StoryTeller::PersistedStartupLocation.clear
  end

  super
end