NamedResources tutorial

From Rubygame

Jump to: navigation, search
(A Warning About Caching: Rephrased for clarity)
(A Warning About Caching: ... and so is Surface["player.png"], because that is the same object too!)
Line 47: Line 47:
# ... player1 is affected too, because it refers to the same object.
# ... player1 is affected too, because it refers to the same object.
player1.get_at( [0,0] )                # => [1, 2, 3, 4]
player1.get_at( [0,0] )                # => [1, 2, 3, 4]
 +
 +
# ... and so is Surface["player.png"], because that is the same object too!
 +
Surface["player.png"].get_at( [0,0] )  # => [1, 2, 3, 4]
</source>
</source>

Revision as of 07:02, 28 October 2009

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox