Пример #1
0
        public PhysicsManager()
        {
            Components = new List<PhysicsComponent>();

            ConfigFileParser physicsConfigFileParser = new ConfigFileParser("cfg/physics_world.txt");

            _world = new World(new Vector2(0f, physicsConfigFileParser.GetAsFloat("Gravity")));
        }
Пример #2
0
 static ConfigFileParser GetConfigFileParser(String filename)
 {
     if (ConfigFileParserMap.ContainsKey(filename))
     {
         return ConfigFileParserMap[filename];
     }
     else
     {
         ConfigFileParser configFileParser = new ConfigFileParser(filename);
         ConfigFileParserMap.Add(filename, configFileParser);
         return configFileParser;
     }
 }