Example
#{example}"); ipb.editor_values.get('templates')['togglesource'] = new Template(""); ipb.editor_values.get('templates')['toolbar'] = new Template(""); ipb.editor_values.get('templates')['button'] = new Template("
Emoticons
"); // Add smilies into the mix ipb.editor_values.set( 'show_emoticon_link', false ); ipb.editor_values.set( 'bbcodes', $H({"snapback":{"id":"1","title":"Post Snap Back","desc":"This tag displays a little linked image which links back to a post - used when quoting posts from the board. Opens in same window by default.","tag":"snapback","useoption":"0","example":"[snapback]100[/snapback]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"topic":{"id":"5","title":"Topic Link","desc":"This tag provides an easy way to link to a topic","tag":"topic","useoption":"1","example":"[topic=1]Click me![/topic]","switch_option":"0","menu_option_text":"Enter the topic ID","menu_content_text":"Enter the title for this link","single_tag":"0","optional_option":"0","image":""},"post":{"id":"6","title":"Post Link","desc":"This tag provides an easy way to link to a post.","tag":"post","useoption":"1","example":"[post=1]Click me![/post]","switch_option":"0","menu_option_text":"Enter the Post ID","menu_content_text":"Enter the title for this link","single_tag":"0","optional_option":"0","image":""},"spoiler":{"id":"7","title":"Spoiler","desc":"Spoiler tag","tag":"spoiler","useoption":"0","example":"[spoiler]Some hidden text[/spoiler]","switch_option":"0","menu_option_text":"","menu_content_text":"Enter the text to be masked","single_tag":"0","optional_option":"0","image":""},"acronym":{"id":"8","title":"Acronym","desc":"Allows you to make an acronym that will display a description when moused over","tag":"acronym","useoption":"1","example":"[acronym='Laugh Out Loud']lol[/acronym]","switch_option":"0","menu_option_text":"Enter the description for this acronym (EG: Laugh Out Loud)","menu_content_text":"Enter the acronym (EG: lol)","single_tag":"0","optional_option":"0","image":""},"hr":{"id":"12","title":"Horizontal Rule","desc":"Adds a horizontal rule to separate text","tag":"hr","useoption":"0","example":"[hr]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"1","optional_option":"0","image":""},"php":{"id":"14","title":"PHP Code","desc":"Allows you to enter PHP code into a formatted/highlighted syntax box","tag":"php","useoption":"0","example":"[php]$variable = true;\n\nprint_r($variable);[/php]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"html":{"id":"15","title":"HTML Code","desc":"Allows you to enter formatted/syntax-highlighted HTML code","tag":"html","useoption":"0","example":"[html]\n \n[/html]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"sql":{"id":"16","title":"SQL Code","desc":"Allows you to enter formatted/syntax-highlighted SQL code","tag":"sql","useoption":"0","example":"[sql]SELECT p.*, t.* FROM posts p LEFT JOIN topics t ON t.tid=p.topic_id WHERE t.tid=7[/sql]","switch_option":"0","menu_option_text":"","menu_content_text":"","single_tag":"0","optional_option":"0","image":""},"xml":{"id":"17","title":"XML Code","desc":"Allows you to enter formatted/syntax-highlighted XML code","tag":"xml","useoption":"0","example":"[xml]1 Replies - 36 Views - Last Post: Yesterday, 08:28 PM
#1
Reputation: 3
- Posts: 61
- Joined: 21-March 13
Posted Yesterday, 08:06 PM
i have two classes, enemy class and level class.in level class i am changing the counter value.
note i set up my if statment so it will only goes in onces and never again. so if u reach lvl 2 than it will go in lvl2 if statment onces reset counter to 10. than wait when player reach lvl 3.
if(...) //if lvl 1 { //change counter = 20 } if(...) //if lvl 2 { //change counter = 10 } if(...) //if lvl 3 { //change counter = 5 }
enemy.class
this method just makes enemy to shoot bullet. and counter is the time between every shoot. so enemy shoot a bullet than wait 20 int. when reach 0 than shoot again.
loop/method counter--; if(counter <= 0 &&!shooting) { //create bullet object / add in arraylist shooting = true; counter = 20; //reset } if(counter != 0) { shooting= false; }
the problem is that i am hard coding value of counter=20 in emeny class.but i value of counter change depends on wha level player is on.
i was thinking of making counter1, counter2, counter3, in level class. and in enemy class i can use getter method to get the value and do i test.
the problem with this is i end up making variable for every lvls. is there way so i only use one counter. and dont rewrite code.
Is This A Good Question/Topic? 0
Replies To: game bug. making less variables
#2
Reputation: 8903
- Posts: 32,983
- Joined: 27-December 08
Re: game bug. making less variables
Posted Yesterday, 08:28 PM
Based on the if statements you have provided, it seems that counter = 20 - ((level - 1) * 5).
Page 1 of 1
Source: http://www.dreamincode.net/forums/topic/317772-game-bug-making-less-variables/
staten island chuck dr jekyll and mr hyde edwin jackson punksatony phil 2012 groundhog day groundhog phil pee wee herman
No comments:
Post a Comment