private List<cRigidBodyGameObject> _rigidBodies; // This will need to be more generic later, when we need non-rectangle objects #endregion Fields #region Constructors public cPhysics() { _instance = this; _gravity = new Vector2(0, 9.81f); _physicsSimulator = new PhysicsSimulator(_gravity*18); //_physicsSimulator.AllowedPenetrations = 1; //_physicsSimulator.BiasFactor = 0.1f; _rigidBodies = new List<cRigidBodyGameObject>(); }
public void loadLevel(String levelName) { // Very quick and dirty way of removing all objects! _scene = new cScene(); _physics = new cPhysics(); _player = new cPlayer(); _particleEngine = new cParticleEngine(); _effectManager = cEffectManager.Instance; _lightMapManager = new cLightMapManager(); _portalManager = new cPortalManager(); _gameTimer = 0; _scene.loadLevel(levelName); _scene.initLevel(); cCamera.Instance.FocusObject = _player; _player.LivesRemain = 3; _gameState = GAME_STATE.INTRO; }