Int width = g.getFontMetrics().stringWidth(getName()) G.setFont(new Font("Arial", Font.PLAIN, 14)) (I tryed to use arrayList).Īlso like in classical snake game i want to make snake grow when it eats food.īut instead of making it longer i need to add more circles.Ĭode i wrote for the circle (script name is also "Circle") public void drawToScreen(Graphics2D g)Įllipse2D border = new Ellipse2D.Double(getX()-getSize()/2, getY()-getSize()/2, getSize(), getSize()) Įllipse2D shape = new Ellipse2D.Double(getX()-getSize()/2, getY()-getSize()/2, getSize(), getSize()) I am trying to use Graphics2D for it and I successfully draw a circle.īut I couldnt make it lot of circles which is attached to eachothers. ![]() I want to make a snake game which is snake (player) can go to every direction (like in slither.io game).Īnd i am trying to make a snake from circles. I am trying to make a snake game in java but the thing i am trying to make is not a normal snake game.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |