示例#1
0
 public override void Initialize()
 {
     _batch = new SpriteBatch(_device);
     _primitiveBatch = new PrimitiveBatch(_batch);
     _camera = new Camera();
     _player = new Player();
     _healthBar = new HealthBar();
 }
示例#2
0
 public void Draw(PrimitiveBatch batch, Player player)
 {
     batch.DrawRectangle(_base, Color.White, 1);
     var health = new Rectangle(11, 11, 10, (int) player.GillPower);
     batch.DrawFilledRectangle(health, Color.Blue);
 }