public ParticleEmmiter(PhysicsEngine pe, Vector2 pos, Vector2 tar, float vel, float rate, float maxAge) { this.pe = pe; this.Position = pos; this.Target = tar; this.Rate = rate; this.ttl = maxAge; this.Velocity = vel; }
public override void Load() { ActiveProfile = new PlayerProfile("null"); MathUtil.Init((float)DefaultSettings.Settings["PixelsPerMeter"]); Size = ((Vector2)(Size)Utilities.DefaultSettings.Settings["WindowSize"]) / MathUtil.PixelsPerMeter; PhysicsManager = new PhysicsEngine(); UIManager = new GUIEngine(); GraphicsManager = new GraphicsEngine(); GraphicsTemp.load(); InitGame(); // InitPhysicsEngine(); <-- called in InitGame InitUI(); }
private void InitPhysicsEngine() { PhysicsManager = new PhysicsEngine(); foreach (Actor actor in ActiveMap.GameObjects) { if (actor.IsPhysicsable) PhysicsManager.AddPolyBody(actor.PolyBody); } }
public override void Load() { MathUtil.Init((float)DefaultSettings.Settings["PixelsPerMeter"]); Size = ((Vector2)(Size)Utilities.DefaultSettings.Settings["WindowSize"]) / MathUtil.PixelsPerMeter; PhysicsManager = new PhysicsEngine(); UIManager = new GUIEngine(); GraphicsEngine.Load(); InitGame(); // InitPhysicsEngine(); <- happens in initGame by map InitUI(); }
public override void Load() { ActiveProfile = new PlayerProfile("null"); MathUtil.Init((float)DefaultSettings.Settings["PixelsPerMeter"]); size = ((Vector2)(Size)Utilities.DefaultSettings.Settings["WindowSize"]) / MathUtil.PixelsPerMeter; PhysicsManager = new PhysicsEngine(); UIManager = new UIEngine(); GraphicsManager = new GraphicsEngine(); gameLoopFPS = new FPSManager(); font = (SpriteFont)ContentRepository.Content["Text"]; //circ = (Texture2D)ContentRepository.Content["Circle"]; GraphicsEngine.Load(); InitPhysicsEngine(); InitUI(); }