Sha256: 3439fa4288efe4d2a70b1de2b69fd916f5852821b9b5ad857276ba5e3413c4ef
Contents?: true
Size: 688 Bytes
Versions: 1
Compression:
Stored size: 688 Bytes
Contents
import 'basics/entities/portal' class Room < Entity def connect(destination, direction, type = Portal, two_way = true) portal = type.new self.plot, :name => direction, :parent => self, :destination => destination if two_way == true reverse = Portal.reverse(direction) if reverse == nil raise "\"#{direction.cap_first}\" does not have an opposite direction" end portal2 = type.new(self.plot, { :name => reverse, :parent => destination, :destination => self }) end portal end def tell(message, refresh = false) children.each { |c| c.tell message, refresh } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gamefic-0.1.1 | lib/gamefic/import/basics/entities/room.rb |