yeah great indeed. but i see i dont have an easy way to go thru this problem.
to what st33d said, i can only say no. i dont have a good way to see what are the conditions of each created enemie, because i dont create them from a list. at least not on the conventional way.
i use the "shots" verry much.
http://www.deci.blindado.net/loliness/
see on DOCS the... kind of documentation i made about the shots. its basicly a particle system, that have the uses that i want. the shot_mng class just inputs values on the shot class, so the class behaves in determined ways. the good about the shoot_mng class is that already stores the values of the shot we want to make. so if we say "newShot(...... whatever we want it to do and so on" we can have the same shooting everytime we say "shoot".
that way i can easly have the same movement for many enemies of same kind, i would only have to say "getShot"...
well actualy that can be a good way to do it.
however a problem maintains. the whole enemie drawing, the enemie shooting plan, and the enemie creation itself is RANDOM. compleatly from its core.
i create a new enemie (that make enemie) and the reason why i make new motion and whatever objects, is because they create themselfs in a random way.
for example, the drawing. you probably cant see it right because of the grey colors i've used on the enemies, but when you start a new enemie_draw object, the object itself creates a random drawing. if you start the applet a few times, you'll notice the enemies are never the same, and hardly similar. you can start the applet as many times as you want, you will always have diferent enemie drawing.
now even worst is the enemie shooting plan. it is again also diferent every time. every time you enitialize a new shooting plan, you just have to say it where the shooting points are positioned. you can see that the class constructor gets an array with the position of the shots, and an array of simple 0s and 1s. that is determined on the enemie's drawing class, when that one is made, it determines the postion of the shooting points, and how many diferent kinds of shooting plans we want for the groups of shooting points that i have. that ia made on the enemie drawing class, because that is where the points of the drawing are, and it determines the shooting points positions depending on the points of the drawing. the 0s and the 1s are only to say when "make a new plan" and "aplly the plan you alrady have". what that plan making class does is call the "newShot(..... whatever you want the shots to do" into each shooting point, depending on 0 it will only call on the plan existed, on 1 makes a new plan and applys. finaly the update calls the "shoot(NOW)" whenever the plan decides to.
this is all generated with randoms, wich are the carnI, carnF, carnB on the first file.
so, each object is verry VERRY unique :\
they all make diferent things to the enemie. i could easly make a new random enemie everytime i wanted a new enemie. thats what i had before. if you erase what's inside the newEnemie() function of the enemie_mng class, and copy this there:
for (int i = 0; i < enemies.length; i++)
{
if (enemies[i] == null)
{
getMove();
tempDraw = new enemie_draw(carnI(255), carnI(255));
tempPlan = new enemie_shots(tempDraw.getShootPs(), tempDraw.getPlan());
enemies[i] = new enemie(tempDraw, tempMove, tempPlan, tempDraw.maximus);
break;
}
}
you will get a compleatly new random enemie ever 10 or 20 frames. i dont want so much random. i want 9 random enemies, and i want to call them every time i want :\, thank you for the hel but thats not exactly what i have here.
as for the rest of the comments, i have the same problem, i would have to do a copy class for each object :\
i guess that's the only way. but still i cant stubornly think that there should be a better way to do it. those java pages i found explain exactly my problem and they probably tell how i could solve it. if i knew how to implement their code, and if i understood what they say on the page.
i'll try to wait a bit more for diferent opinions and guesses, but otherwize, i'll just make the copy function inside every class, wich will b a major pain XD but its cool
thanks everyone for the wonderfull help, its good to see that people are actualy interested in help and discuss the problems.