• entries
437
1000
• views
338620

# XNA Game Components

196 views

XNA Game Components

I'm VERY impressed by this video. XNA makes me smile :)

That is pure awsome.

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.

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]

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

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

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...

Wow thats awesome :D

Viva la games revolution!

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

That's nuts.....

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.

XNA unfortunately doesn't work on my 10 year old machine.

## Create an account

Register a new account