Results 1 to 2 of 2
Thread: Globale variable for all classes
- 01-16-2013, 03:35 PM #1
Member
- Join Date
- Jan 2013
- Posts
- 1
- Rep Power
- 0
Globale variable for all classes
I'm making a game, and i want some help, so if someone can help me? it would be helpfull! :D
i have more than 1 question so i hope i can talk to him in private chat.
but one of my question is, i want to make a integer score; for counting the score.. logic.
and i made in one class the mainscreen, and in another class the screen where you can get the points.
so i made in mainscreen a textview that displays the score. And a button to go to the other screen. When i got to the other screen and i push a button, i need to do: score = score + 1; but how to attach score in another screen / class?
Hope you can answer my question! Thanks!
- 01-17-2013, 01:53 PM #2
Member
- Join Date
- Nov 2012
- Location
- India
- Posts
- 70
- Rep Power
- 0
Similar Threads
-
Passing a variable between classes
By Nanomech in forum New To JavaReplies: 4Last Post: 08-22-2011, 12:29 PM -
Shared variable for other classes
By Cemi in forum New To JavaReplies: 20Last Post: 04-09-2010, 11:42 PM -
Use 1 variable in different bean/classes
By maneuk in forum EclipseReplies: 14Last Post: 04-09-2010, 03:19 PM -
variable scope between classes
By newbie123 in forum New To JavaReplies: 6Last Post: 03-03-2010, 11:20 PM -
Passing variable information between classes
By zen_to_go in forum New To JavaReplies: 1Last Post: 10-30-2007, 08:09 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks