void Awake() { if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(gameObject); } }
public GameManager() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; Template = new Template(); // Systems systems.Add(renderer = new Renderer()); systems.Add(collisionHandler = new CollisionHandler()); systems.Add(physicsHandler = new PhysicsHandler()); systems.Add(animationHandler = new AnimationHandler(Content)); systems.Add(stateHandler = new StateHandler()); systems.Add(particleSystemHandler = new ParticleSystemHandler()); systems.Add(parallaxHandler = new ParallaxHandler()); }