/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (BlockSimulatorGame game = new BlockSimulatorGame()) { game.Run(); } }
public UtilityManager(BlockSimulatorGame game) : base(game) { FPSUtility fpsUtility = new FPSUtility(_game, FPS_X, FPS_Y); PositionUtility positionUtility = new PositionUtility(_game, POS_X, POS_Y); _utilityList = new List<Utility>(); _utilityList.Add(fpsUtility); _utilityList.Add(positionUtility); }
public PhysicsObject(BlockSimulatorGame game, Vector3 position, Vector3 scale, string modelDir) { _position = position; _scale = scale; Body = new Body(); Skin = new CollisionSkin(Body); Body.CollisionSkin = Skin; //Vector3 com = SetMass(1.0f); //Body.MoveTo(_position, Matrix.Identity); //Skin.ApplyLocalTransform(new Transform(-com, Matrix.Identity)); //Body.EnableBody(); }
public Block(BlockSimulatorGame game, Vector3 position, Vector3 scale, string modelDir) : base(game, position, scale, modelDir) { Box box = new Box(Position, Matrix.Identity, Scale); Skin.AddPrimitive(box, new MaterialProperties( 0.8f, // elasticity 0.8f, // static roughness 0.7f // dynamic roughness )); Vector3 com = SetMass(1.0f); Body.MoveTo(Position, Matrix.Identity); Skin.ApplyLocalTransform(new Transform(-com, Matrix.Identity)); Body.EnableBody(); PhysicsSystem.CurrentPhysicsSystem.AddBody(Body); LoadContent(game, modelDir); }
public BedrockBlock(BlockSimulatorGame game, Vector3 position, Vector3 scale, string modelDir) : base(game, position, scale, modelDir) { Body.Immovable = true; }
public Manager(BlockSimulatorGame game) { _game = game; }
public GrassBlock(BlockSimulatorGame game, Vector3 position, Vector3 scale, string modelDir) : base(game, position, scale, modelDir) { Body.Immovable = false; }
public Utility(BlockSimulatorGame game, float x, float y) { _position = new Vector2(); _position.X = x; _position.Y = y; }
public FontManager(BlockSimulatorGame game) : base(game) { KOOTENAY_FONT = _game.Content.Load<SpriteFont>("res/fonts/kootenay"); }
public PositionUtility(BlockSimulatorGame game, float x, float y) : base(game, x, y) { _game = game; _camera = Camera.ActiveCamera; }
protected virtual void LoadContent(BlockSimulatorGame game, string modelDir) { _model = game.Content.Load<Model>(modelDir); }
public BlockManager(BlockSimulatorGame game) : base(game) { _effect = new BasicEffect(_game.GraphicsDevice); RenderMap(); }
public PhysicsManager(BlockSimulatorGame game) : base(game) { _physicsSystem = new PhysicsSystem(); _physicsSystem.CollisionSystem = new CollisionSystemSAP(); }
public FPSUtility(BlockSimulatorGame game, float x, float y) : base(game, x, y) { }
protected override void LoadContent(BlockSimulatorGame game, string modelDir) { base.LoadContent(game, modelDir); }