So I began designing an app (it's a 2d fighting game) and I've been coding it in processing. I don't have the slightest clue on how to make an app for blackberry or ipod or anything like that, I'm just out of my first year of programming. My app runs fine atm on my pc when I run it from within processing (like I open the code and hit the arrow button). I haven't completed the app yet but I know that I want my next move to be running it on a blackberry.
So can anyone give a total noobtardo (me) some advice on how to do this? Considering I have almost no knowledge of computer science besides some programming basics..
this gives me a black stickman image with a transparent background so you can see the background behind him. here's a screenshot:
then I use image() and specify where on the screen I want the image to go..
I want to add color to this image but I have no idea how. I tried to use the tint() function right before image() is called but that did not do anything. I tried looking at the api and other online sources but I am still confused.. can anyone give me some tips?
The code works fine and displays the health bars until this method gets called when the mouse is pressed:
model.decreaseHealth(10, 0);
here is the decreaseHealth method:
public void decreaseHealth(int n, int play){
player[play].currentHealth-=n;
if (player[play].currentHealth < 0)
player[play].currentHealth = 0;
}
I do not get an exception if I called this method at the same time as the other decrease health method:
model.decreaseHealth(10,1); //note the only difference is the second parameter is a 1 instead of 0
I don't know why calling the method on player[1] makes the exception not happen but it does. Also if I call model.decreaseHealth(10,1) on its own without model.decreaseHealth(10,0) the code works fine also and the healthbars update properly.