So the first two lessons we talked about ownership of variables (instances) and also about referencing the ContentManager instance to the Sprite instance in order to use it to load a texture within that sprite. We made a quick paint class diagram to display an overview of what is happening.
Also notice how the Game is unable to directly acces the position and texture variables because they are OWNED by the Sprite class - Can't touch this ! :D
donderdag 10 januari 2013
Sprite.cs
This is the Sprite class we programmed in the second class of Programming Principles.
Pay attention to the encapsulation of the variables. No variable is public (directly accesable) and they are only editable and accesable through the Operator and Get methods.
Link to the Sprite class: http://softlion.nl/joris/ProgrammingPrinciples/Sprite.cs
If you are going to use the Sprite class linked here for you own XNA project, make sure you correct the namespace.
Pay attention to the encapsulation of the variables. No variable is public (directly accesable) and they are only editable and accesable through the Operator and Get methods.
Link to the Sprite class: http://softlion.nl/joris/ProgrammingPrinciples/Sprite.cs
If you are going to use the Sprite class linked here for you own XNA project, make sure you correct the namespace.
woensdag 9 januari 2013
Hello World
If you guys are here for the seminar Programming Principles by Kevin Wilmink and Joris van Leeuwen, then you typed in the correct URL :D
In this blog we will be posting lesson material such as dia slides and source codes.
In this blog we will be posting lesson material such as dia slides and source codes.
Abonneren op:
Posts (Atom)

