Thread: Need some help with Enum

Results 1 to 2 of 2
  1. #1 Need some help with Enum 
    Registered Member
    Join Date
    Oct 2014
    Posts
    143
    Thanks given
    9
    Thanks received
    12
    Rep Power
    6
    Figured it out dan be closed
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    May 2012
    Posts
    286
    Thanks given
    7
    Thanks received
    49
    Rep Power
    25
    You can put methods inside the enum, so you can just add a getter for the level.

    Like this I guess
    Code:
    int getLevel(){
    return level; //or LEVEL if you actually spelled it that way
    }
    then you can call it with
    Code:
    Input.getLevel();
    (You might want to consider using a lower case letter instead of a capital I)
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 3
    Last Post: 12-03-2008, 10:29 PM
  2. Need some help with my client
    By imcool121 in forum Help
    Replies: 2
    Last Post: 11-29-2008, 10:51 AM
  3. Need some help with myspace.
    By kiraush in forum Chat
    Replies: 2
    Last Post: 10-06-2008, 05:03 AM
  4. I Need some help with Sprites..
    By XKoed in forum Graphics
    Replies: 3
    Last Post: 02-17-2008, 09:27 PM
  5. i need some help with...
    By mewrenee in forum Tutorials
    Replies: 0
    Last Post: 01-19-2008, 01:02 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •