Link to home
Start Free TrialLog in
Avatar of thrawn80
thrawn80Flag for Singapore

asked on

How do I make a class a single-instance throughout my game?

Hi all,

The question is in the title itself. I'm not sure of how to do it properly. :(

Some told me to use "static" before the class keyword

so it's like

static class myClass {
}

May I ask, is that the way?
Thanks!
ASKER CERTIFIED SOLUTION
Avatar of jatinderalagh
jatinderalagh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial