jdown | Transform a directory of markdown files to JSON | Static Site Generator library
kandi X-RAY | jdown Summary
kandi X-RAY | jdown Summary
If you're creating content in markdown or use a CMS like NetlifyCMS which outputs markdown files, jdown can transform the content into JSON containing HTML at build time, ready to be consumed within templates.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of jdown
jdown Key Features
jdown Examples and Code Snippets
Community Discussions
Trending Discussions on jdown
QUESTION
I create a platform game with 20 levels for android devices. Every level has different walking platforms and new enemies with differents properties. I have the first frame with 20 buttons , The first button go to first level(frame 2) the second button go to second level(frame 3) and goes on until the final level in frame 21. I write all of my code in frame 2(level 1) player movement , enemies properties , coins , life etc. When the player die or the player complete the stage i go to frame 1 and im ready to click to level 2 button , go to second stage in frame 3. So , what part of my code i must transfer to second level ?
Here is part of my code in second frame. (i show only one enemy(medouza) and the controls that i move the player because is a large code)
...ANSWER
Answered 2017-Mar-22 at 18:02I would just put all game code on frame 1.
Also make a new MovieClip on frame 1 called levelsMC that is a container all the level frames (use "cut frames" from stage timeline & paste them inside the levels MC timeline),
Now your code can just say for level 2 = levelsMC.gotoAndStop(2);
or for level 3 levelsMC.gotoAndStop(3);
...
Because code and levelsMC are both on frame 1, you don't have to transfer (re-copy) any code.
Your working logic would be :
I have the first frame with one button ( levelButton ),
- I have a variable nextLevel (integer) that has frame number. I update as
nextLevel = 2;
- The first button tells levelsMC go to first level (using
levelsMC.gotoAndStop(2);
) or can uselevelsMC.gotoAndStop(nextLevel);
- the second button go to second level (using
levelsMC.gotoAndStop(3);
)and goes on until the final level in frame 21 (
levelsMC.gotoAndStop(21);
).I write all of my code in frame 1 and to show from level 1 onwards I say :
startScreenMC.visible = false;
andlevelsMC.visible = true;
When the player complete the stage I update nextLevel number (integer) as
+1
and i'm ready to click to levelButton, where click/tap function simply tells levelsMC to got frame x (where x is nextLevel amount) like this :
levelsMC.gotoAndStop( nextLevel );
PS: Look into AS3 linkage
tutorials. Makes it easier to create an MC of coin or charatcer and just addChild
that to levelsMC when needed. Then code access it via path like levelsMC.coin = visible = false;
etc.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jdown
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page