Wall.java
Upload User: kikomiki
Upload Date: 2021-10-31
Package Size: 373k
Code Size: 0k
Category:

Games

Development Platform:

Java

  1. package com.bjsxt.tank;
  2. import java.awt.*;
  3. public class Wall {
  4. int x, y, w, h;
  5. TankClient tc ;
  6. public Wall(int x, int y, int w, int h, TankClient tc) {
  7. this.x = x;
  8. this.y = y;
  9. this.w = w;
  10. this.h = h;
  11. this.tc = tc;
  12. }
  13. public void draw(Graphics g) {
  14. g.fillRect(x, y, w, h);
  15. }
  16. public Rectangle getRect() {
  17. return new Rectangle(x, y, w, h);
  18. }
  19. }