Collision Detection between two images in Java

前端 未结 9 1934
情歌与酒
情歌与酒 2020-11-27 06:53

I have two characters displayed in a game I am writing, the player and the enemy. defined as such:

public void player(Graphics g) {
    g.drawImage(plimg, x,         


        
9条回答
  •  温柔的废话
    2020-11-27 07:34

    Here's a useful of an open source game that uses a lot of collisions: http://robocode.sourceforge.net/

    You may take a look at the code and complement with the answers written here.

提交回复
热议问题