Results 1 to 2 of 2
  1. #1
    krazyk is offline Member
    Join Date
    Dec 2012
    Rep Power

    Default Slick: what does this line of code do?


    Java Code:
    ((MenuState) sbg.getState(BucketGame.MENUSTATE)).setLastState(this);
    I'm not sure how this line works. Is the "MenuState" a type of casting? i would really appreciate if someone could tell me how this code works. Note: "sbg" is an instance of a State Based Game.

    The method definition of setLastState is:

    Java Code:
    	public void setLastState(GameState lastState)
    		this.lastState = lastState;
    Thanks in advance

  2. #2
    Zyril is offline Senior Member
    Join Date
    Oct 2011
    Rep Power

    Default Re: Slick: what does this line of code do?

    You don't think you would be better of asking in a forum dedicated for this library instead of a Java forum that has nothing to do with Slick?

    Slick Forums • Index page

Similar Threads

  1. [Slick] Animating a GIF?
    By SX16 in forum Java 2D
    Replies: 0
    Last Post: 11-27-2011, 02:52 AM
  2. Replies: 6
    Last Post: 07-25-2011, 12:51 PM
  3. Constructors pls explan the code line by line in comments
    By vibaviattigala in forum New To Java
    Replies: 1
    Last Post: 02-19-2011, 04:03 AM
  4. can you tell me what this line mean in this code?
    By Laythe in forum Java Applets
    Replies: 5
    Last Post: 10-17-2009, 11:10 PM
  5. What does this line of code mean?
    By naxalyte in forum New To Java
    Replies: 1
    Last Post: 11-23-2007, 09:28 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