• Advertisement
  • entries
    437
  • comments
    1000
  • views
    336182


10 Comments


Recommended Comments

Looks pretty sweet. I think it is a great idea to share these components. Finally, maybe we can all write some games.

My only question is, being a .NET noob, what was his constant referal to "this" when he was writing the code?

In his last example, just jumped into the menu code and wrote something like "this.terrain" or something to that effect -- well, what is "this"? If he is in the menu code, it doesn't make much sense that the menu owns the terrain. I am rather confused.

Share this comment


Link to comment
Quote:
Original post by visage
In his last example, just jumped into the menu code and wrote something like "this.terrain" or something to that effect -- well, what is "this"? If he is in the menu code, it doesn't make much sense that the menu owns the terrain. I am rather confused.


wasn't it this.game, which makes perfect sense as 'this' object has a reference to a 'game' object which gives us access to everything else.

And yes, this is a bag of assumeness, thus my plans to use XNA to write a game in the up and coming week [smile]

Share this comment


Link to comment
Holy shit, now I see the big deal about the XNA.

ITS BLOODY DRAG AND DROP MMORPGS PEOPLE!!!!!!

Share this comment


Link to comment
this in C# is just a self reference to the class. ie


class Foo
{
int a = 3;

public Foo()
{
this.a = 5;
}
}


Haven't watched the video yet though...

Share this comment


Link to comment
Krisc, I understand that. It is almost the same in any object oriented language (C++/Java ... Ruby uses 'self', that rebel). Just the way he was using "this" didn't make sense to me for what it was referring to. It was making it looking like a big, coupled mess.

I think I just mid-read what he typed, though

Share this comment


Link to comment
I played with it yesterday and today, and I must say... WOW, it is AWESOME. Ugh, now back to work in C++ land, while I count the days 'til we can use XNA in our projects.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement