Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add level pick

fix level pick, add option
  • Loading branch information...
commit 579ce0e9a36f545ca85194ded828ed9fe1c59ada 1 parent 9d69fcc
@adhicl authored
View
16 README.md
@@ -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
22 cloneman/README.md
@@ -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
55 cloneman/com/clip/intro.as
@@ -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);
}
View
18 cloneman/com/clip/levelScreen.as
@@ -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);
}
View
72 cloneman/com/clip/optionClip.as
@@ -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);
+ }
+
+ }
+
+}
View
6 cloneman/com/clip/title.as
@@ -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();
+ }
+
}
}
View
9 cloneman/com/game/common/App.as
@@ -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();
}
}
View
42 cloneman/com/game/common/Levels.as
@@ -29,7 +29,7 @@
+"1,2,2,2,2,2,2,2,1,0,1,1,1,1,1,1,1,1,0,1\n"
+"1,2,2,2,2,2,2,2,1,0,0,0,0,0,0,P,0,0,0,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[1] = "Remember! Move with arrow key and clone with space";
+ introText[1] = "Learn basic control\nBy: ACL";
stageMap[2] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,F,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1\n"
@@ -46,7 +46,7 @@
+"1,2,2,2,2,2,2,2,1,0,1,3,1,2,2,2,2,2,2,1\n"
+"1,2,2,2,2,2,2,2,1,0,P,0,1,2,2,2,2,2,2,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[2] = "Some things can be pushed";
+ introText[2] = "Pushing things\nBy: ACL";
stageMap[3] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,F,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1\n"
@@ -63,7 +63,7 @@
+"1,2,2,2,2,2,2,2,1,0,1,0,1,2,2,2,2,2,2,1\n"
+"1,2,2,2,2,2,2,2,1,0,0,0,1,2,2,2,2,2,2,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[3] = "Be careful where you step";
+ introText[3] = "Trap introduction\nBy: ACL";
stageMap[4] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,P,0,0,0,0,0,0,0,1,1,F,0,0,0,0,0,0,0,1\n"
@@ -80,7 +80,7 @@
+"1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1\n"
+"1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,E,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[4] = "Now the level start";
+ introText[4] = "Think simple\nBy: ACL";
stageMap[5] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,1,1,F,0,0,0,0,0,0,E,0,0,0,0,0,0,1,1,1\n"
@@ -97,7 +97,7 @@
+"1,1,1,0,0,0,0,0,t,0,0,0,0,E,0,0,0,1,1,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[5] = "The last one is easy right";
+ introText[5] = "Four side\nBy: ACL";
stageMap[6] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,2,2,1,0,1,0,1,0,1,2,2,2,2,1,0,1,1,F,1\n"
@@ -114,7 +114,7 @@
+"1,1,1,1,0,1,0,1,0,1,1,1,1,1,1,0,1,1,0,1\n"
+"1,P,0,0,0,0,0,0,0,t,0,0,0,0,0,E,0,0,0,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[6] = "So far so good";
+ introText[6] = "Temptation\nBy: ACL";
stageMap[7] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,P,0,0,0,0,0,0,0,0,0,0,0,0,0,E,1,1,F,1\n"
@@ -131,7 +131,7 @@
+"1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1\n"
+"1,E,0,0,0,0,0,0,0,0,0,0,0,0,0,E,0,0,0,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[7] = "And I am quite proud at the last one too";
+ introText[7] = "Lots of boxes\nBy: ACL";
stageMap[8] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,0,0,0,0,0,0,0,0,E,0,0,0,0,0,0,0,0,P,1\n"
@@ -148,7 +148,7 @@
+"1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,1,0,1,0,1\n"
+"1,0,0,0,0,0,0,0,0,E,0,0,0,0,0,0,0,0,0,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[8] = "I thought that one would surely";
+ introText[8] = "Fast n Furious\nBy: ACL";
stageMap[9] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,P,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,1\n"
@@ -165,7 +165,7 @@
+"1,0,0,0,1,0,0,0,0,3,3,0,0,0,0,1,0,0,0,1\n"
+"1,F,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[9] = "So you can even figure out that";
+ introText[9] = "Diamond\nBy: ACL";
stageMap[10] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,0,P,3,1,0,0,3,0,0,0,0,0,3,0,0,3,0,0,1\n"
@@ -182,7 +182,7 @@
+"1,3,3,3,0,0,3,t,0,0,0,0,0,3,0,0,3,0,0,1\n"
+"1,0,0,3,0,0,3,0,0,0,0,0,0,3,0,0,3,0,0,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[10] = "Oh gotta think hard";
+ introText[10] = "Snail\nBy: ACL";
stageMap[11] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
@@ -200,7 +200,7 @@
+"1,0,0,1,0,0,1,0,0,2,2,0,0,1,0,0,1,0,0,1\n"
+"1,1,1,0,0,1,0,0,0,2,2,0,0,0,1,0,0,1,1,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[11] = "Time to introduce something new";
+ introText[11] = "Door n key\nBy: ACL";
stageMap[12] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,0,3,0,3,0,3,0,3,k,1,F,E,0,0,0,0,0,0,0,0,0,0,0,0,1\n"
@@ -217,7 +217,7 @@
+"1,3,0,3,0,3,0,3,0,0,1,0,3,0,3,0,3,0,0,3,0,3,0,3,0,1\n"
+"1,0,P,0,0,0,0,0,0,0,4,0,0,3,0,3,0,0,0,0,3,0,3,0,k,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[12] = "Larger will make me prevail";
+ introText[12] = "Wider area\nBy: ACL";
stageMap[13] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,0,0,0,0,s,s,0,0,E,0,0,0,s,s,0,0,0,0,1\n"
@@ -237,7 +237,7 @@
+"1,3,3,1,1,0,0,1,1,3,3,1,1,0,0,1,1,3,3,1\n"
+"1,0,0,0,0,s,s,0,0,0,E,0,0,s,s,4,4,0,F,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[13] = "Curiosity kills the cat";
+ introText[13] = "Trap introduction 2\nBy: ACL";
stageMap[14] =
"1,5,1,1,1,1,1,1,1,5,1,5,1,1,1,1,1,1,1,5,1\n"
+"1,0,s,s,s,s,s,s,s,0,1,0,1,1,1,1,1,1,1,0,1\n"
@@ -261,7 +261,7 @@
+"1,0,1,0,0,s,0,0,1,0,1,0,1,1,1,1,1,1,1,0,1\n"
+"1,0,1,1,1,1,1,1,1,0,4,0,s,s,s,s,s,s,s,0,1\n"
+"1,5,1,1,1,1,1,1,1,5,1,5,1,1,1,1,1,1,1,5,1\n";
- introText[14] = "That actually makes it easier right";
+ introText[14] = "Mirroring\nBy: ACL";
stageMap[15] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,5,0,0,3,0,0,1,1,0,0,3,0,0,1,1,0,0,3,0,0,5,1\n"
@@ -279,7 +279,7 @@
+"1,0,k,3,0,3,0,s,s,0,3,0,3,0,s,s,0,3,0,3,4,4,1\n"
+"1,5,0,0,3,0,0,1,1,0,0,3,0,0,1,1,0,0,3,0,4,F,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[15] = "How about this one";
+ introText[15] = "Diamond boxes\nBy: ACL";
stageMap[16] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,P,0,3,0,0,3,0,0,3,0,0,1,0,0,3,0,0,1,0,0,1\n"
@@ -303,7 +303,7 @@
+"1,0,0,3,t,0,3,0,0,3,0,0,3,0,0,3,0,0,3,0,0,1\n"
+"1,0,0,3,0,0,3,0,0,3,0,0,3,0,0,3,0,0,3,0,F,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[16] = "Maybe I am approaching it wrong";
+ introText[16] = "Memory game\nBy: ACL";
stageMap[17] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,5,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5,1\n"
@@ -328,7 +328,7 @@
+"1,0,3,0,0,0,E,0,0,0,1,0,3,0,0,0,E,0,0,0,3,0,1\n"
+"1,5,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[17] = "This will scared even you";
+ introText[17] = "Fear factor\nBy: ACL";
stageMap[18] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,1,P,0,0,0,0,0,0,1,F,1,k,0,0,0,0,0,0,1,1\n"
@@ -353,7 +353,7 @@
+"1,0,0,3,0,0,3,0,0,0,0,0,0,0,3,0,0,3,0,0,1\n"
+"1,0,0,3,0,0,3,0,0,0,5,0,0,0,3,0,0,3,0,0,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[18] = "This is complicated even for me";
+ introText[18] = "Hard worker\nBy: ACL";
stageMap[19] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,0,0,0,0,0,1,0,0,0,s,0,0,0,0,0,s,0,0,0,1,0,0,0,0,0,1\n"
@@ -382,7 +382,7 @@
+"1,0,0,0,0,1,0,3,0,0,0,s,0,0,0,s,0,0,0,3,0,1,0,0,0,0,1\n"
+"1,0,0,0,0,0,1,0,0,0,s,0,0,0,0,0,s,0,0,0,1,0,0,0,0,0,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[19] = "You won't get the timing on this one";
+ introText[19] = "Timing\nBy: ACL";
stageMap[20] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1\n"
@@ -407,7 +407,7 @@
+"1,0,1,1,1,1,0,1,1,1,1,3,1,1,1,0,1,1,1,3,1,1,1,1,0,1,1,1,1,0,1\n"
+"1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,E,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[20] = "Those hooligans always caught on my trap";
+ introText[20] = "Old style\nBy: ACL";
stageMap[21] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1\n"
@@ -436,7 +436,7 @@
+"1,0,1,1,1,1,1,T,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1\n"
+"1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1\n"
+"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n";
- introText[21] = "Time for my little invention";
+ introText[21] = "Robot invasion\nBy: ACL";
stageMap[22] =
"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n"
+"1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1\n"
View
2  cloneman/com/game/common/Setting.as
@@ -6,7 +6,7 @@
*/
public class Setting{
public static var gameSpeed:int = 30;
- public static var defaultLevel:int = 1;
+ public static var defaultLevel:int = 22;
public static var maxLevel:int = 20;
public static var removeClone:int = 5000 / gameSpeed;
View
34 cloneman/com/game/main.as
@@ -3,7 +3,10 @@
import com.game.common.App;
import com.game.common.Setting;
import com.game.common.Levels;
+ import flash.display.Loader;
+ import flash.display.LoaderInfo;
import flash.events.ProgressEvent;
+ import flash.net.URLRequest;
import com.clip.title;
import com.clip.intro;
@@ -12,15 +15,28 @@
import com.clip.finishClip;
import com.clip.levelScreen;
import com.clip.creditScreen;
+ import com.clip.optionClip;
import flash.display.MovieClip;
import flash.events.Event;
+ import flash.system.Security;
public class main extends MovieClip {
public function main() {
App.GetInstance().mMain = this;
this.addEventListener(Event.ADDED_TO_STAGE, onAddedListener);
- this["mPreloader"].initLoader(this.loaderInfo);
+ //this["mPreloader"].initLoader(this.root.loaderInfo);
+
+ var paramObj:Object = LoaderInfo(this.loaderInfo).parameters;
+ var apiPath:String = paramObj.kongregate_api_path || "http://www.kongregate.com/flash/API_AS3_Local.swf";
+
+ Security.allowDomain(apiPath);
+
+ var request:URLRequest = new URLRequest(apiPath);
+ var loader:Loader = new Loader();
+ loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadAPIComplete);
+ loader.load(request);
+ this.addChild(loader);
}
protected function onAddedListener(e:Event):void {
@@ -28,6 +44,13 @@
init();
}
+ protected function loadAPIComplete(e:Event):void {
+ App.GetInstance().kongregate = e.target.content;
+ App.GetInstance().kongregate.services.connect();
+
+ this.play();
+ }
+
protected function init():void {
App.GetInstance().InitManager();
}
@@ -48,6 +71,11 @@
this.addChild(level);
}
+ public function CreateOptionScreen():void {
+ var opt:optionClip = new optionClip();
+ this.addChild(opt);
+ }
+
public function CreateCreditScreen():void {
var credit:creditScreen = new creditScreen();
this.addChild(credit);
@@ -99,6 +127,7 @@
App.GetInstance().gameState = Setting.STATE_RESULT;
switch(result) {
case Setting.RESULT_WIN:
+ App.GetInstance().mData.SolvedPuzzle(App.GetInstance().curLevel);
this.addChild(new resultWin());
break;
case Setting.RESULT_LOSE:
@@ -119,7 +148,8 @@
App.GetInstance().curLevel++;
initLevel();
}else {
- this.addChild(new finishClip());
+ //this.addChild(new finishClip());
+ CreateTitlePage();
}
}
View
34 cloneman/com/game/manager/DataManager.as
@@ -0,0 +1,34 @@
+package com.game.manager
+{
+ import com.game.common.Setting;
+
+ import flash.net.SharedObject;
+
+ /**
+ * @author Adhi
+ */
+ public class DataManager {
+ protected var mSO:SharedObject;
+
+ public var puzzleSolved:Array = new Array(50);
+
+ public function DataManager():void {
+ mSO = SharedObject.getLocal("cloneManSaveData");
+ for (var i:int = 1; i <= Setting.maxLevel; i++) {
+ puzzleSolved[i] = (mSO.data["solved_" + i] == null)?false:mSO.data["solved_" + i];
+ //trace(i+" isSolved? "+puzzleSolved[i]);
+ }
+ }
+
+ public function SolvedPuzzle(level:int):void {
+ mSO.data["solved_" + level] = true;
+ puzzleSolved[i] = true;
+ SaveData();
+ }
+
+ public function SaveData():void {
+ mSO.flush();
+ }
+ }
+
+}
View
33 cloneman/com/game/manager/SoundManager.as
@@ -1,5 +1,7 @@
package com.game.manager
{
+ import com.game.common.App;
+
import flash.events.Event;
import flash.media.Sound;
import flash.media.SoundChannel;
@@ -15,6 +17,7 @@
var loopMusic:Sound;
var curMusic:String;
var isChanging:Boolean = false;
+ var lastStop:int = 0;
public function ClearSound():void {
for (var i:String in allObjectSound) {
@@ -43,6 +46,28 @@
}
}
+ public function ToogleMusic():void {
+ if (App.GetInstance().useMusic) {
+ LoopingMusic();
+ }else{
+ lastStop = loopSoundChannel.position;
+ loopSoundChannel.stop();
+ loopSoundChannel.removeEventListener(Event.SOUND_COMPLETE, onSoundComplete);
+ }
+ }
+
+ public function ToogleSound():void {
+ if (!App.GetInstance().useSound) {
+ for (var i:String in allObjectSound) {
+ try{
+ StopSound(i);
+ }catch (e:Error) {
+
+ }
+ }
+ }
+ }
+
protected function LoopingMusic():void {
if (isChanging) {
loopSoundChannel.stop();
@@ -50,8 +75,11 @@
var ClassSoundRef:Class = getDefinitionByName(curMusic) as Class;
loopMusic = new ClassSoundRef;
}
- loopSoundChannel = loopMusic.play(0);
- loopSoundChannel.addEventListener(Event.SOUND_COMPLETE, onSoundComplete);
+ if (App.GetInstance().useMusic){
+ loopSoundChannel = loopMusic.play(lastStop);
+ lastStop = 0;
+ loopSoundChannel.addEventListener(Event.SOUND_COMPLETE, onSoundComplete);
+ }
isChanging = false;
}
@@ -69,6 +97,7 @@
public function PlaySound(type:String, who:String):void {
var ClassSoundRef:Class;
var sound:Sound;
+ if (!App.GetInstance().useSound) return;
if (allObjectSound[who] != null) {
if (allObjectSound[who]["curSoundName"] == type) {
var channel:SoundChannel = allObjectSound[who]["channel"];
Please sign in to comment.
Something went wrong with that request. Please try again.