Module: RGSS::Drawable
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#viewport ⇒ Object
Returns the value of attribute viewport.
-
#visible ⇒ Object
Returns the value of attribute visible.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
-
#z ⇒ Object
Returns the value of attribute z.
Instance Method Summary collapse
-
#<=>(v) ⇒ Object
$a=0.
- #>(v) ⇒ Object
- #dispose ⇒ Object
- #disposed? ⇒ Boolean
- #draw(destination = Graphics) ⇒ Object
- #initialize(viewport = nil) ⇒ Object
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
180 181 182 |
# File 'lib/openrgss/rgss.rb', line 180 def created_at @created_at end |
#viewport ⇒ Object
Returns the value of attribute viewport.
180 181 182 |
# File 'lib/openrgss/rgss.rb', line 180 def @viewport end |
#visible ⇒ Object
Returns the value of attribute visible.
181 182 183 |
# File 'lib/openrgss/rgss.rb', line 181 def visible @visible end |
#x ⇒ Object
Returns the value of attribute x.
180 181 182 |
# File 'lib/openrgss/rgss.rb', line 180 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
180 181 182 |
# File 'lib/openrgss/rgss.rb', line 180 def y @y end |
#z ⇒ Object
Returns the value of attribute z.
181 182 183 |
# File 'lib/openrgss/rgss.rb', line 181 def z @z end |
Instance Method Details
#<=>(v) ⇒ Object
$a=0
207 208 209 210 211 |
# File 'lib/openrgss/rgss.rb', line 207 def <=>(v) #print $a+=1 return 1 if (self>v) return -1 end |
#>(v) ⇒ Object
194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/openrgss/rgss.rb', line 194 def >(v) return false if self..nil?&&v. unless (v..nil?) return false if self..z<v..z return false if self..z==v..z and self..created_at<v..created_at end return false if self.z<v.z return false if self.z==v.z and self.y<v.y return false if self.z==v.z and self.y==v.y and self.created_at<v.created_at return true end |
#dispose ⇒ Object
231 232 233 234 |
# File 'lib/openrgss/rgss.rb', line 231 def dispose @disposed = true RGSS.resources.delete self end |
#disposed? ⇒ Boolean
227 228 229 |
# File 'lib/openrgss/rgss.rb', line 227 def disposed? @disposed end |
#draw(destination = Graphics) ⇒ Object
297 298 299 |
# File 'lib/openrgss/rgss.rb', line 297 def draw(destination=Graphics) raise NotImplementedError end |
#initialize(viewport = nil) ⇒ Object
183 184 185 186 187 |
# File 'lib/openrgss/rgss.rb', line 183 def initialize(=nil) @created_at = Time.now @viewport = self.visible = @visible end |