Permalink
Browse files

add level pick

fix level pick, add option
  • Loading branch information...
1 parent 9d69fcc commit 579ce0e9a36f545ca85194ded828ed9fe1c59ada @adhicl committed Nov 26, 2012
View
@@ -4,15 +4,19 @@ CREATED BY ACL
CREATED AT 2012
-CLONE MAN IS A SUBJECT OF EXPERIMENT IN CLONING. IT SOMEHOW WENT WRONG AND HE NOW CAN CLONE HIMSELF. IT'S JUST THAT THE CLONE IS MUCH MORE WEAKER AND WILL DISAPPEAR AFTER SOME TIME.
-NOT GIVING UP, TRYING TO PROVE HIMSELF, CLONE MAN NOW SET UP TO CLEAR THE PUZZLE THE SCHEMER SET UP TO KILL HIM.
+Clone Man was subject of experiment in cloning. The experiment went wrong and now he can clone himself as much as he want.
+Unfortunately the clone is much weaker than him and will disappear after some time. And thus he was thrown out.
+Not giving up, trying to prove himself, now he set up to clear puzzles created by the schemer. Puzzles that can kill him if he is not careful.
+
+A puzzle, memory, retro game with simple graphic. Try to solve the puzzles with only your ability to clone.
MOVE WITH ARROW KEY
CLONE WITH SPACE KEY
-CLONE WILL ALWAYS MOVE CLOCKWISE
-
-<img src="http://i.imgur.com/lxZrD.png" style="border:0;">
-
+ScreenShot:
+http://imageshack.us/photo/my-images/856/map1sw.png/
+http://imageshack.us/photo/my-images/15/keyanddoor.png/
+http://imageshack.us/photo/my-images/577/entrapping.png/
+http://imageshack.us/photo/my-images/515/switchtrap.png/
View
@@ -0,0 +1,22 @@
+CLONE MAN
+
+CREATED BY ACL
+
+CREATED AT 2012
+
+Clone Man was subject of experiment in cloning. The experiment went wrong and now he can clone himself as much as he want.
+Unfortunately the clone is much weaker than him and will disappear after some time. And thus he was thrown out.
+Not giving up, trying to prove himself, now he set up to clear puzzles created by the schemer. Puzzles that can kill him if he is not careful.
+
+A puzzle, memory, retro game with simple graphic. Try to solve the puzzles with only your ability to clone.
+
+
+MOVE WITH ARROW KEY
+
+CLONE WITH SPACE KEY
+
+ScreenShot:
+http://imageshack.us/photo/my-images/856/map1sw.png/
+http://imageshack.us/photo/my-images/15/keyanddoor.png/
+http://imageshack.us/photo/my-images/577/entrapping.png/
+http://imageshack.us/photo/my-images/515/switchtrap.png/
View
@@ -16,7 +16,6 @@
public function intro():void {
this.addEventListener(Event.ADDED_TO_STAGE, onAdded);
- mTimer = new Timer(2000,1);
}
protected function onAdded(e:Event):void {
@@ -26,9 +25,55 @@
this.removeEventListener(Event.ADDED_TO_STAGE, onAdded);
this.addEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
this.addEventListener(MouseEvent.CLICK, onClicked);
-
- mTimer.addEventListener(TimerEvent.TIMER, onTimer);
- mTimer.start();
+
+ var timeout:int = 2000;
+ if (App.GetInstance().curLevel == 1) {
+ var tut1:MovieClip = new tutor1();
+ tut1.x = (800 - tut1.width) / 2;
+ this["txt_Stage"].y = 20;
+ this["txt_level"].y = 20;
+ this["txt_desc"].visible = false;
+ tut1.y = 100;
+ this.addChild(tut1);
+ }else if (App.GetInstance().curLevel == 2) {
+ var tut2:MovieClip = new tutor2();
+ tut2.x = (800 - tut2.width) / 2;
+ this["txt_Stage"].y = 20;
+ this["txt_level"].y = 20;
+ this["txt_desc"].visible = false;
+ tut2.y = 100;
+ this.addChild(tut2);
+ }else if (App.GetInstance().curLevel == 3) {
+ var tut3:MovieClip = new tutor3();
+ tut3.x = (800 - tut3.width) / 2;
+ this["txt_Stage"].y = 20;
+ this["txt_level"].y = 20;
+ this["txt_desc"].visible = false;
+ tut3.y = 100;
+ this.addChild(tut3);
+ }else if (App.GetInstance().curLevel == 11) {
+ var tut4:MovieClip = new tutor4();
+ tut4.x = (800 - tut4.width) / 2;
+ this["txt_Stage"].y = 20;
+ this["txt_level"].y = 20;
+ this["txt_desc"].visible = false;
+ tut4.y = 100;
+ this.addChild(tut4);
+ }else if (App.GetInstance().curLevel == 13) {
+ var tut5:MovieClip = new tutor5();
+ tut5.x = (800 - tut5.width) / 2;
+ this["txt_Stage"].y = 20;
+ this["txt_level"].y = 20;
+ this["txt_desc"].visible = false;
+ tut5.y = 100;
+ this.addChild(tut5);
+ }
+ /*else {
+ mTimer = new Timer(timeout,1);
+ mTimer.addEventListener(TimerEvent.TIMER, onTimer);
+ mTimer.start();
+ }
+ */
}
protected function onClicked(e:MouseEvent):void {
@@ -37,7 +82,7 @@
protected function onRemoved(e:Event):void {
this.removeEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
- mTimer.removeEventListener(TimerEvent.TIMER, onTimer);
+ //mTimer.removeEventListener(TimerEvent.TIMER, onTimer);
this.removeEventListener(MouseEvent.CLICK, onClicked);
}
@@ -7,6 +7,7 @@
import flash.events.Event;
import flash.events.MouseEvent;
+ import fl.containers.ScrollPane;
/**
* @author Adhi
*/
@@ -18,18 +19,25 @@
protected function onAdded(e:Event):void {
this.addEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
- for (var i:int = 1; i < Setting.maxLevel;i+=10){
- this["btn_level_"+i].addEventListener(MouseEvent.CLICK, onClicked);
+ for (var i:int = 0; i < Setting.maxLevel; i ++) {
+ var newButton:MovieClip = new levelSelection();
+ newButton.x = 10 + (i % 3) * 200;
+ newButton.y = 5 + Math.floor(i / 3) * 120;
+ newButton.name = "btn_level_" + (i + 1);
+ newButton["txt_level"].text = "Puzzle " + (i + 1);
+ newButton["txt_desc"].text = App.GetInstance().mLevel.introText[i + 1];
+ newButton["mcSolved"].visible = App.GetInstance().mData.puzzleSolved[i + 1];
+ newButton.addEventListener(MouseEvent.CLICK, onClicked);
+ this["mcContent"].addChild(newButton);
}
+ this["mcScroll"].source = this["mcContent"];
+ this["mcScroll"].refreshPane();
this["btn_back"].addEventListener(MouseEvent.CLICK, onBack);
}
protected function onRemoved(e:Event):void {
this.removeEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
this.removeEventListener(Event.ADDED_TO_STAGE, onAdded);
- for (var i:int = 1; i < Setting.maxLevel;i+=10){
- this["btn_level_"+i].removeEventListener(MouseEvent.CLICK, onClicked);
- }
this["btn_back"].removeEventListener(MouseEvent.CLICK, onBack);
}
@@ -0,0 +1,72 @@
+package com.clip
+{
+ import com.game.common.App;
+
+ import flash.display.MovieClip;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+
+ /**
+ * ...
+ * @author Adhi
+ */
+ public class optionClip extends MovieClip{
+ public function optionClip():void {
+ this.addEventListener(Event.ADDED_TO_STAGE, onAdded);
+ }
+
+ protected function onAdded(e:Event):void {
+ this.addEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
+ this["mc_sound"].buttonMode = true;
+ this["mc_sound"].addEventListener(MouseEvent.CLICK, onSoundClicked);
+ if (App.GetInstance().useSound) {
+ this["mc_sound"].gotoAndStop("on");
+ }else {
+ this["mc_sound"].gotoAndStop("off");
+ }
+ this["mc_music"].buttonMode = true;
+ this["mc_music"].addEventListener(MouseEvent.CLICK, onMusicClicked);
+ if (App.GetInstance().useMusic) {
+ this["mc_music"].gotoAndStop("on");
+ }else {
+ this["mc_music"].gotoAndStop("off");
+ }
+ this["btn_back"].addEventListener(MouseEvent.CLICK, onBack);
+ }
+
+ protected function onRemoved(e:Event):void {
+ this.removeEventListener(Event.ADDED_TO_STAGE, onAdded);
+ this.removeEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
+ this["mc_sound"].removeEventListener(MouseEvent.CLICK, onSoundClicked);
+ this["mc_music"].removeEventListener(MouseEvent.CLICK, onMusicClicked);
+ }
+
+ protected function onSoundClicked(e:MouseEvent):void {
+ if (App.GetInstance().useSound) {
+ App.GetInstance().useSound = false;
+ this["mc_sound"].gotoAndPlay("turnoff");
+ }else {
+ App.GetInstance().useSound = true;
+ this["mc_sound"].gotoAndPlay("turnon");
+ }
+ App.GetInstance().mSound.ToogleSound();
+ }
+
+ protected function onMusicClicked(e:MouseEvent):void {
+ if (App.GetInstance().useMusic) {
+ App.GetInstance().useMusic = false;
+ this["mc_music"].gotoAndPlay("turnoff");
+ }else {
+ App.GetInstance().useMusic = true;
+ this["mc_music"].gotoAndPlay("turnon");
+ }
+ App.GetInstance().mSound.ToogleMusic();
+ }
+
+ protected function onBack(e:MouseEvent):void {
+ App.GetInstance().mMain.ReturnToTitle(this);
+ }
+
+ }
+
+}
@@ -19,12 +19,14 @@
this.removeEventListener(Event.ADDED_TO_STAGE, onAdded);
this["btn_start"].addEventListener(MouseEvent.CLICK, onStartClick);
this["btn_credit"].addEventListener(MouseEvent.CLICK, onCreditClick);
+ this["btn_option"].addEventListener(MouseEvent.CLICK, onOptionClick);
}
protected function onRemoved(e:Event):void {
this.removeEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
this["btn_start"].removeEventListener(MouseEvent.CLICK, onStartClick);
this["btn_credit"].removeEventListener(MouseEvent.CLICK, onCreditClick);
+ this["btn_option"].addEventListener(MouseEvent.CLICK, onOptionClick);
}
protected function onStartClick(e:MouseEvent):void {
@@ -42,6 +44,10 @@
App.GetInstance().mMain.CreateCreditScreen();
}
+ protected function onOptionClick(e:MouseEvent):void {
+ App.GetInstance().mMain.CreateOptionScreen();
+ }
+
}
}
@@ -3,6 +3,7 @@ package com.game.common
import com.game.manager.InputManager;
import com.game.manager.MapManager;
import com.game.manager.SoundManager;
+ import com.game.manager.DataManager;
import com.clip.cloneman;
import com.game.main;
import com.game.common.Levels;
@@ -18,6 +19,7 @@ package com.game.common
public var mInput:InputManager;
public var mMap:MapManager;
public var mSound:SoundManager;
+ public var mData:DataManager;
public var mLevel:Levels;
public var gameState:int = Setting.STATE_LOAD;
@@ -29,6 +31,12 @@ package com.game.common
public var mWidth:Number;
public var mHeight:Number;
+ public var useSound:Boolean = true;
+ public var useMusic:Boolean = true;
+
+
+ public var kongregate:*;
+
public static function GetInstance():App {
if (app == null) {
app = new App();
@@ -41,6 +49,7 @@ package com.game.common
mMap = new MapManager();
mLevel = new Levels();
mSound = new SoundManager();
+ mData = new DataManager();
}
}
Oops, something went wrong.

0 comments on commit 579ce0e

Please sign in to comment.