android tile game not outputting map

前端 未结 1 1613
执念已碎
执念已碎 2021-01-26 16:21

I am making a tile based game in Android Studio. I want the map to output circles (islands) if it loops past a 1, and the circle should be in the correct grid coordinates howeve

1条回答
  •  借酒劲吻你
    2021-01-26 17:23

    Along with color, you also need to set a few other things:

    paint.setStyle(Paint.Style.STROKE);
    

    or

    paint.setStyle(Paint.Style.FILL);
    

    It's possible that your onDraw method isn't being called. If adding the paint style doesn't fix your problem entirely, you should probably verify that onDraw is being called with a log at the beginning of the method.

    0 讨论(0)
提交回复
热议问题