Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 272
  • Last Modified:

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?
2 Solutions

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now