This site requires JavaScript, please enable it in your browser!
Greenfoot back
Dudeson
Dudeson wrote ...

2015/4/7

hell me with this

Dudeson Dudeson

2015/4/7

#
Hello , so I am writing because I need help making a game. Maybe for first time i have bitten more then I can chew.Well this is my game. As you see these cylinder are spinning around each other , for an example orange cylinder stays in place while blue one spins around him. IF i press space , game use method canSee() to check if blue cylinder see wall he suppose to stick to wall and then orange ball should spin around blue cylinder. But there is a problem. Firstly I need to make blue cylinder know how to position it self correctly on wallFoward class. As I understand i need to get wall that blue cylinder can see coordinates and then position it so he would stick correctly on wall. I wound out that you can call class XY but I will have a lot of same classes in world and all of them has their own index and it becomes tricky again. I was trying to solve it by my self but I can't find solution. It's my first game.
danpost danpost

2015/4/7

#
Providing your world (myWorld) class code and the cylinder (Balls and Cylinder1) class code would go a long way in determining the best course of action in this regard. The Cylinder2 class is not needed as I am quite sure it is similar to the Cylinder1 class.
Dudeson Dudeson

2015/4/7

#
Yes ,I guess code would be the same . Could you show me any example how I could make it work? I mean , I'm struggling to make read that coordinates of wallFoward , position it self and work one after another.
You need to login to post a reply.