[Ironruby-core] Xna+IronRuby+RubyNewb=headache

Tomas Matousek Tomas.Matousek at microsoft.com
Thu Nov 20 12:51:53 EST 2008


Note that "initialize" (lower-case) doesn't manifest itself as a CLR constructor for the derived class. The derived Ruby class is currently represented by a CLR type that has a single ctor taking RubyClass. We are working on improving .NET interop here.

Tomas

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher
Sent: Thursday, November 20, 2008 6:56 AM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] Xna+IronRuby+RubyNewb=headache

There shouldn't be a conflict in recent versions of IronRuby.  "Initialize" != "initialize" now.

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Gabriel Rotar
Sent: Thursday, November 20, 2008 6:00 AM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] Xna+IronRuby+RubyNewb=headache

Curt Hagenlocher wrote:
Hi
> Is this a Ruby class that you've derived from an XNA type or just the XNA type > directly?
Well making a game using Xna basically meas inheriting the Game class
present in Xna and implementing it's methods so yes it's a ruby class
that gets derived from the Microsoft.Xna.Framework.Game class.
The structure required by your main game class is as follows:

-the constructor witch in c# is identified by the class name and in ruby
as initialize
-the graphic initialization/reinitialization method identified by the
name "Initialize", this is the one that is making problems.
-methods for both loading and unloading content
-an update method and a draw method witch make up the actual game loop.

So again my question is how can I call the graphics initialization
function "Initialize", from Ruby, when it has the same name as a ruby
constructor.
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core



More information about the Ironruby-core mailing list