I want to be able to create a method that I can call like a static class in my game so I can move the sprites for example:
Code
functions.move(Vector2Position)
The problem is that I can’t use Instance Constructors in a static method. Is there any way of doing this or will I have to do something else?
EDIT :
I need to be able to call this outside the current class.
Have a look at Static Constructors and Static Classes on MSDN. In short:
You can declare a static class using the “static” keyword. This indicates that a class cannot be instantiated. Note that a static method can exist in normal classes too, not just ones marked “static”.
You can have a static constructor if you need to initialize the class in any way:
You would then call the method with the code below. This could be done anywhere – within any other static or instance method.