Javascript gamelib problem

Discussion in 'JavaScript' started by cognac, Jan 20, 2011.

  1. #1
    I am making a project in javascript game programming based on gameLib. But i have some problems with a function. Similar to Pacman game i have to generate some points(food for pacman) which will be sprite objects. I can make them, but my problem is that i cannot remove them when pacman hits(collides) them. If anyone can help me with a function or command for this, id be grateful. Ty.
     
    cognac, Jan 20, 2011 IP
  2. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think the switchOn and switchOff functions are used to control the display of sprite objects, like this:

    mysprite.switchOn();
    mysprite.switchOff();

    I have not used gamelib but that is what I found reading the docs, and the few examples I saw used those functions. Good luck! :D
     
    Cash Nebula, Jan 24, 2011 IP