|
Is there a way to store xy cooridnates in a point structure instead of a Vector2 (I dont want to have to convert the floats to int every time I use them) I tried System.Collections.Generic;, but this still does not give the Point structure for C#. Is there another collections I need to use? Thanks!
(comments are locked)
|
then use it like: you can also use it with a constructor: in which case you could do this: Thanks! That really helped a lot!! =]! If you read this, and have a second, I would like to know what exactly is going on. I have not really run into this type of set-up yet in my basic code skills. Thanks again!!!
Aug 04 '12 at 04:11 PM
TobiasP
Hi, a lot can be said about them so I've provided some links for you. Basically they are very similar to classes, but should generally be used for lightweight things only (unless you want to kill performance). They are a value type like int or char, as opposed to a reference type, which a class is. More on value vs reference types: http://msdn.microsoft.com/en-us/library/t63sy5hs(v=vs.80).aspx http://www.c-sharpcorner.com/uploadfile/e7ad16/reference-type-and-value-type-in-C-Sharp/ Here are the links on structs, in order: http://msdn.microsoft.com/en-us/library/ah19swz4(v=vs.71).aspx http://www.csharp-station.com/Tutorial/CSharp/lesson12 http://www.dotnetperls.com/struct http://stackoverflow.com/questions/7484735/c-struct-vs-class-faster http://stackoverflow.com/questions/521298/when-to-use-struct-in-c Hope this helps!
Aug 04 '12 at 05:01 PM
agamedesigner
Thanks you!
Aug 04 '12 at 06:06 PM
TobiasP
(comments are locked)
|
