View Single Post
Old 05-16-2008, 06:43 AM   #5 (permalink)
jsedlak
Experienced Zuner
 
jsedlak's Avatar
 
Join Date: May 2008
Posts: 114
Reputation: 22
$zB: 97
Donate
Default

You do not have a basic understanding of C#. You have a basic understanding of what the equal sign does in C#.

The reason you cannot just move a line like that is because code is context sensitive. The entire reason this line of code worked in the first place is because in its original place, the code had access to an object named player (probably of type Player or something similar). When you take the line out of this place and move it to another file, you are removing it from the context and thus that object no longer is available to modify. You have to somehow pass the reference to the new place.


Your best bet to answering this problem is to buy a C# book and learn Object Oriented Programming. It is near impossible to learn how to program just by modifying someone else's game.
__________________
John Sedlak
Microsoft Xna / DirectX MVP

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



jsedlak is offline   Reply With Quote