Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Gideros Game Template - Page 3 — Gideros Forum

Gideros Game Template

13»

Comments

  • @ar2rsawseen Oh ok, why did you delete the crate example where they just fall down? Is there any way we can download that template again? :\">

    I'm asking because I wanted to test the transition from clearing a level to the next one. I am mainly trying to see how unlocking levels/packs work, in order to implement something similar on my game.
  • @ar2rsawseen Well, I've found one of the very first tests I did with the template. I think that might help. Thanks anyway!
  • somezombiegmsomezombiegm Member
    edited August 2014
    @ar2rsawseen Hello again. I was testing the sounds with one of the audio files
    sounds:play("complete")
    and didn't work even if I changed the sound option from on to off and then to on again.

    This code was needed on main.lua to solve the issue
    -- Enable sounds
    if sets:get("sounds") then
    	sounds:on()
    end
    Cheers :).

    Likes: ar2rsawseen

    +1 -1 (+1 / -0 )Share on Facebook
  • How can I pause the game (level.lua), go to another scene and come back to the same scene with the game still paused and all the level values as they were before pausing? (If this post needs to be on another thread please let me know).

    I'm trying to think of a way to do it. If I stay on level.lua class, I'm guessing it's easy to stop the timers and block or remove some of the events (like Event.ENTER_FRAME) while the game is paused.

    But I want to pause the game, change scene and then go back to the paused game. I'm confused cause on the changeScene function on scenemanager.lua, a new object of the new scene is always created.
    self.scene2 = self.scenes[scene].new()
    self.scene2:setVisible(false)
    self:addChild(self.scene2)
    Could a way to do it be to modify scenemanager.lua with something like this?:
    if scene == "level" then
        self.scene2 = self.previouslySavedLevelScene
    else
        self.scene2 = self.scenes[scene].new()
    end
    self.scene2:setVisible(false)
    self:addChild(self.scene2)
  • thanks a lot for this!
  • @somezombiegm The simples way is a popup. Basically you don't use sceneManager, but instead create instance your self and add it to current scene.

    Then you need to enable ignoring touch and mouse events, like this:
    function Popup:init()
    	self:addEventListener(Event.MOUSE_DOWN, self.ignore, self)
    	self:addEventListener(Event.MOUSE_MOVE, self.ignore, self)
    	self:addEventListener(Event.MOUSE_UP, self.ignore, self)
    end
     
    function Popup:ignore(e)
    	e:stopPropagation()
    end
    This will prevent from input events passing to current scene, and you are good to go with the popup scene :)
Sign In or Register to comment.