public static void InitializeEngine(Game1 game1) { game1 = game1 ?? new Game1(); if (game1.SpriteBatch != null) { SpriteBatch = game1.SpriteBatch; } if (EngineManager == null) { EngineManager = new EngineManager(game1); } else { EngineManager.Game1 = game1; } }
public static void SetEngineManagerLastLevel(EngineManager engine) { _engineManagerLastLevel = engine; }
public static void LoadDataContent(EngineManager engineManager) { EngineManager = engineManager; PlaneOffsetLeft = 0; PlaneOffsetUp = 0; // Friction table FrictionTable[0] = new float[6]; FrictionTable[1] = new float[6]; FrictionTable[2] = new float[6]; FrictionTable[3] = new float[6]; FrictionTable[4] = new float[6]; FrictionTable[5] = new float[6]; FrictionTable[0][0] = 0.8f; FrictionTable[0][1] = FrictionTable[1][0] = 0.6f; FrictionTable[0][2] = FrictionTable[2][0] = 0.9f; FrictionTable[0][3] = FrictionTable[3][0] = 0.7f; FrictionTable[0][4] = FrictionTable[4][0] = 1f; FrictionTable[0][5] = FrictionTable[5][0] = 0.1f; FrictionTable[1][1] = 0.4f; FrictionTable[1][2] = FrictionTable[2][1] = 0.56f; FrictionTable[1][3] = FrictionTable[3][1] = 0.5f; FrictionTable[1][4] = FrictionTable[4][1] = 0.62f; FrictionTable[1][5] = FrictionTable[5][1] = 0.1f; FrictionTable[2][2] = 0.95f; FrictionTable[2][3] = FrictionTable[3][2] = 0.7f; FrictionTable[2][4] = FrictionTable[4][2] = 0.8f; FrictionTable[2][5] = FrictionTable[5][2] = 0.1f; FrictionTable[3][3] = 0.75f; FrictionTable[3][4] = FrictionTable[4][3] = 0.7f; FrictionTable[3][5] = FrictionTable[5][3] = 0.1f; FrictionTable[4][4] = 0.8f; FrictionTable[4][5] = FrictionTable[5][4] = 0.1f; FrictionTable[5][5] = 0.1f; // Restitution table RestitutionTable[0] = new float[6]; RestitutionTable[1] = new float[6]; RestitutionTable[2] = new float[6]; RestitutionTable[3] = new float[6]; RestitutionTable[4] = new float[6]; RestitutionTable[5] = new float[6]; RestitutionTable[0][0] = 0.9f; RestitutionTable[0][1] = RestitutionTable[1][0] = 0.7f; RestitutionTable[0][2] = RestitutionTable[2][0] = 0.7f; RestitutionTable[0][3] = RestitutionTable[3][0] = 0.7f; RestitutionTable[0][4] = RestitutionTable[4][0] = 0.8f; RestitutionTable[0][5] = RestitutionTable[5][0] = 0.2f; RestitutionTable[1][1] = 0.5f; RestitutionTable[1][2] = RestitutionTable[2][1] = 0.55f; RestitutionTable[1][3] = RestitutionTable[3][1] = 0.55f; RestitutionTable[1][4] = RestitutionTable[4][1] = 0.6f; RestitutionTable[1][5] = RestitutionTable[5][1] = 0.2f; RestitutionTable[2][2] = 0.8f; RestitutionTable[2][3] = RestitutionTable[3][2] = 0.7f; RestitutionTable[2][4] = RestitutionTable[4][2] = 0.65f; RestitutionTable[2][5] = RestitutionTable[5][2] = 0.2f; RestitutionTable[3][3] = 0.8f; RestitutionTable[3][4] = RestitutionTable[4][3] = 0.6f; RestitutionTable[3][5] = RestitutionTable[5][3] = 0.2f; RestitutionTable[4][4] = 0.75f; RestitutionTable[4][5] = RestitutionTable[5][4] = 0.2f; RestitutionTable[5][5] = 0.2f; // Density Table DensityTable[0] = 1200; DensityTable[1] = 700; DensityTable[2] = 2500; DensityTable[3] = 7800; DensityTable[4] = 2400; DensityTable[5] = 2200; }