mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-20 01:37:50 -05:00
Brought up to date with the private repository (feea4c7)
This commit is contained in:
1 parent
1aa738d692
commit
1b1df1ae48
7925 files changed
+2617237
-20
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,206 @@
|
||||
package game.phantomsTreasure
|
||||
{
|
||||
public class PhantomsTreasureData
|
||||
{
|
||||
|
||||
public var _audio:Array;
|
||||
|
||||
public var _levelProgression:Array;
|
||||
|
||||
public var _itemNames:Array;
|
||||
|
||||
public var _facts:Array;
|
||||
|
||||
public function PhantomsTreasureData()
|
||||
{
|
||||
super();
|
||||
initLevelData();
|
||||
}
|
||||
|
||||
public function initLevelData() : void
|
||||
{
|
||||
_facts = [{
|
||||
"imageID":1121,
|
||||
"text":11634
|
||||
},{
|
||||
"imageID":1121,
|
||||
"text":11635
|
||||
},{
|
||||
"imageID":1121,
|
||||
"text":11636
|
||||
},{
|
||||
"imageID":1122,
|
||||
"text":11637
|
||||
},{
|
||||
"imageID":1122,
|
||||
"text":11638
|
||||
},{
|
||||
"imageID":1122,
|
||||
"text":11639
|
||||
},{
|
||||
"imageID":1123,
|
||||
"text":11640
|
||||
},{
|
||||
"imageID":1123,
|
||||
"text":11641
|
||||
},{
|
||||
"imageID":1123,
|
||||
"text":11642
|
||||
},{
|
||||
"imageID":1124,
|
||||
"text":11643
|
||||
},{
|
||||
"imageID":1124,
|
||||
"text":11644
|
||||
},{
|
||||
"imageID":1124,
|
||||
"text":11645
|
||||
},{
|
||||
"imageID":1125,
|
||||
"text":11646
|
||||
},{
|
||||
"imageID":1125,
|
||||
"text":11647
|
||||
},{
|
||||
"imageID":1125,
|
||||
"text":11648
|
||||
},{
|
||||
"imageID":1126,
|
||||
"text":11649
|
||||
},{
|
||||
"imageID":1126,
|
||||
"text":11650
|
||||
},{
|
||||
"imageID":1126,
|
||||
"text":11651
|
||||
},{
|
||||
"imageID":1127,
|
||||
"text":11652
|
||||
},{
|
||||
"imageID":1127,
|
||||
"text":11653
|
||||
},{
|
||||
"imageID":1127,
|
||||
"text":11654
|
||||
},{
|
||||
"imageID":1128,
|
||||
"text":11655
|
||||
},{
|
||||
"imageID":1128,
|
||||
"text":11656
|
||||
},{
|
||||
"imageID":1128,
|
||||
"text":11657
|
||||
},{
|
||||
"imageID":1129,
|
||||
"text":11658
|
||||
},{
|
||||
"imageID":1129,
|
||||
"text":11659
|
||||
},{
|
||||
"imageID":1129,
|
||||
"text":11660
|
||||
},{
|
||||
"imageID":1130,
|
||||
"text":11661
|
||||
},{
|
||||
"imageID":1130,
|
||||
"text":11662
|
||||
},{
|
||||
"imageID":1130,
|
||||
"text":11663
|
||||
},{
|
||||
"imageID":1131,
|
||||
"text":11664
|
||||
},{
|
||||
"imageID":1131,
|
||||
"text":11665
|
||||
},{
|
||||
"imageID":1131,
|
||||
"text":11666
|
||||
},{
|
||||
"imageID":1132,
|
||||
"text":11667
|
||||
},{
|
||||
"imageID":1132,
|
||||
"text":11668
|
||||
},{
|
||||
"imageID":1132,
|
||||
"text":11669
|
||||
},{
|
||||
"imageID":1133,
|
||||
"text":11670
|
||||
},{
|
||||
"imageID":1133,
|
||||
"text":11671
|
||||
},{
|
||||
"imageID":1133,
|
||||
"text":11672
|
||||
},{
|
||||
"imageID":1134,
|
||||
"text":11673
|
||||
},{
|
||||
"imageID":1134,
|
||||
"text":11674
|
||||
},{
|
||||
"imageID":1134,
|
||||
"text":11675
|
||||
},{
|
||||
"imageID":1135,
|
||||
"text":11676
|
||||
},{
|
||||
"imageID":1135,
|
||||
"text":11677
|
||||
},{
|
||||
"imageID":1135,
|
||||
"text":11678
|
||||
},{
|
||||
"imageID":1136,
|
||||
"text":11679
|
||||
},{
|
||||
"imageID":1136,
|
||||
"text":11680
|
||||
},{
|
||||
"imageID":1136,
|
||||
"text":11681
|
||||
},{
|
||||
"imageID":1137,
|
||||
"text":11682
|
||||
},{
|
||||
"imageID":1137,
|
||||
"text":11683
|
||||
},{
|
||||
"imageID":1137,
|
||||
"text":11684
|
||||
},{
|
||||
"imageID":1138,
|
||||
"text":11685
|
||||
},{
|
||||
"imageID":1138,
|
||||
"text":11686
|
||||
},{
|
||||
"imageID":1138,
|
||||
"text":11687
|
||||
},{
|
||||
"imageID":1139,
|
||||
"text":11688
|
||||
},{
|
||||
"imageID":1139,
|
||||
"text":11689
|
||||
},{
|
||||
"imageID":1139,
|
||||
"text":11690
|
||||
}];
|
||||
_itemNames = [{"items":[11691,11692,11693,11694,11695,11696,11697,11698,11699,11700,11701,11702,11703,11704,11705,11706,11707,11708,11709,11710,11711,11712,11713,11714,11715,11716,11717,11718,11719,11720,11721,11722,11723,11724,11725,11726,11727,11728,11729,11730,11731,11732,11733,11734,11735,11736,11737,11738,11739,11740,11741,11742,11743,11744,11745,11746]},{"items":[11747,11748,11749,11750,11751,11752,11753,11754,11755,11756,11757,11758,11759,11760,11761,11762,11763,11764,11765,11766,11767,11768,11769,11770,11771,11772,11773,11703,11774,11775,11776,11777,11778,11779,11780,11781,11782,11783,11784,11785,11786,11787,11727,11788,11728,11789,11790,11791,11792,11793,11794,11795,11796,11797,11798,11799]}];
|
||||
_levelProgression = [{
|
||||
"background":1,
|
||||
"items":[[52,17,10,45,29,40,36,55],[24,37,53,41,49,4,1,8],[9,34,29,43,2,46,31,48],[26,16,36,19,23,50,5,21],[6,54,20,32,22,51,56,42],[14,41,48,12,49,27,17,8],[29,33,39,10,26,31,42,38],[45,5,54,22,47,18,23,50],[25,30,47,3,35,28,27,44],[13,33,2,7,11,15,38,12]]
|
||||
},{
|
||||
"background":2,
|
||||
"items":[[3,31,43,46,47,50,55,56],[10,13,15,36,42,44,45,54],[8,11,12,17,23,30,32,40],[2,6,19,24,35,39,51,53],[5,9,16,18,22,34,48,49],[8,11,12,17,23,30,32,40],[1,14,20,25,27,37,38,41],[4,5,7,10,12,37,53,55],[5,8,16,24,27,45,52,56],[1,10,11,16,22,39,46,51]]
|
||||
}];
|
||||
_audio = ["aj_pt_stinger_newRound.mp3","aj_pt_stinger_correct.mp3","aj_pt_stinger_wrong.mp3","aj_pt_stinger_popup.mp3"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
package game.phantomsTreasure
|
||||
{
|
||||
import flash.display.Bitmap;
|
||||
import flash.display.BitmapData;
|
||||
import flash.display.DisplayObject;
|
||||
import flash.display.Graphics;
|
||||
import flash.display.Sprite;
|
||||
import flash.events.Event;
|
||||
import flash.filters.DisplacementMapFilter;
|
||||
import flash.geom.Matrix;
|
||||
import flash.geom.Point;
|
||||
import flash.geom.Rectangle;
|
||||
|
||||
public class PhantomsTreasureRipple extends Sprite
|
||||
{
|
||||
|
||||
private static const GREY:int = 8421504;
|
||||
|
||||
private static var uniqueColorForReference:uint = 5;
|
||||
|
||||
public var radius:int = 70;
|
||||
|
||||
public var durationInFrames:int = 30;
|
||||
|
||||
public var amplitude:int = 50;
|
||||
|
||||
public var waveSprite:Sprite;
|
||||
|
||||
private var displayObject:DisplayObject;
|
||||
|
||||
private var bitmapData:BitmapData;
|
||||
|
||||
private var bitmap:Bitmap;
|
||||
|
||||
private var displacementMapFilter:DisplacementMapFilter;
|
||||
|
||||
private var position:Point;
|
||||
|
||||
private var currentStep:int;
|
||||
|
||||
private var scale:Number;
|
||||
|
||||
private var currentAmplitude:Number;
|
||||
|
||||
private var matrix:Matrix;
|
||||
|
||||
private var rect:Rectangle;
|
||||
|
||||
private var filterIndex:int;
|
||||
|
||||
private var myFilters:Array;
|
||||
|
||||
private var myColorRef:uint;
|
||||
|
||||
public var _rippleComplete:Boolean;
|
||||
|
||||
public function PhantomsTreasureRipple(param1:DisplayObject)
|
||||
{
|
||||
super();
|
||||
waveSprite = createDisplacementMap();
|
||||
displayObject = param1;
|
||||
matrix = new Matrix(1,0,0,1,1,1);
|
||||
bitmapData = new BitmapData(radius * 2,radius * 2,false,8421504);
|
||||
rect = new Rectangle(0,0,radius * 2,radius * 2);
|
||||
bitmapData.fillRect(rect,8421504);
|
||||
position = new Point();
|
||||
}
|
||||
|
||||
public function rippleIt() : void
|
||||
{
|
||||
_rippleComplete = false;
|
||||
position.x = mouseX - radius;
|
||||
position.y = mouseY - radius;
|
||||
displacementMapFilter = new DisplacementMapFilter(bitmapData,position,1,2,amplitude,amplitude);
|
||||
displacementMapFilter.color = uniqueColorForReference;
|
||||
myColorRef = uniqueColorForReference;
|
||||
uniqueColorForReference = uniqueColorForReference + 1;
|
||||
myFilters = displayObject.filters;
|
||||
myFilters.push(displacementMapFilter);
|
||||
displayObject.filters = myFilters;
|
||||
currentStep = 0;
|
||||
displayObject.addEventListener("enterFrame",updateRipple);
|
||||
}
|
||||
|
||||
private function updateRipple(param1:Event) : void
|
||||
{
|
||||
currentAmplitude = amplitude * ((durationInFrames - currentStep) / durationInFrames);
|
||||
myFilters = displayObject.filters;
|
||||
filterIndex = getFilterIndex();
|
||||
if(currentAmplitude > 0)
|
||||
{
|
||||
scale = currentStep / durationInFrames;
|
||||
matrix.a = scale;
|
||||
matrix.d = scale;
|
||||
matrix.tx = radius;
|
||||
matrix.ty = radius;
|
||||
bitmapData.fillRect(rect,8421504);
|
||||
bitmapData.draw(waveSprite,matrix);
|
||||
displacementMapFilter.scaleX = currentAmplitude;
|
||||
displacementMapFilter.scaleY = currentAmplitude;
|
||||
myFilters[filterIndex] = displacementMapFilter;
|
||||
displayObject.filters = myFilters;
|
||||
}
|
||||
else
|
||||
{
|
||||
rippleComplete();
|
||||
}
|
||||
currentStep = currentStep + 1;
|
||||
}
|
||||
|
||||
private function rippleComplete(param1:Event = null) : void
|
||||
{
|
||||
myFilters.splice(filterIndex,1);
|
||||
displayObject.filters = myFilters;
|
||||
displayObject.removeEventListener("enterFrame",updateRipple);
|
||||
_rippleComplete = false;
|
||||
}
|
||||
|
||||
private function getFilterIndex() : int
|
||||
{
|
||||
var _loc2_:int = 0;
|
||||
var _loc1_:int = int(myFilters.length);
|
||||
if(_loc1_ == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
_loc2_ = 0;
|
||||
while(_loc2_ < _loc1_)
|
||||
{
|
||||
if(myFilters[_loc2_].color == myColorRef)
|
||||
{
|
||||
return _loc2_;
|
||||
}
|
||||
_loc2_++;
|
||||
}
|
||||
trace("ERROR: FILTER IS NOT IN ARRAY");
|
||||
return -1;
|
||||
}
|
||||
|
||||
private function createDisplacementMap() : Sprite
|
||||
{
|
||||
var _loc2_:Sprite = new Sprite();
|
||||
var _loc6_:Graphics = _loc2_.graphics;
|
||||
_loc6_.clear();
|
||||
_loc6_.beginGradientFill("linear",[16711680,0],[1,1],[0,255]);
|
||||
_loc6_.drawCircle(0,0,radius);
|
||||
_loc6_.endFill();
|
||||
var _loc4_:Sprite = new Sprite();
|
||||
_loc6_ = _loc4_.graphics;
|
||||
_loc6_.clear();
|
||||
_loc6_.beginGradientFill("linear",[65280,0],[1,1],[0,255]);
|
||||
_loc6_.drawCircle(0,0,radius);
|
||||
_loc6_.endFill();
|
||||
var _loc1_:Matrix = new Matrix(1,0,0,1,1,1);
|
||||
_loc1_.createGradientBox(radius * 2,radius * 2,0,-radius,-radius);
|
||||
var _loc5_:Sprite = new Sprite();
|
||||
_loc6_ = _loc5_.graphics;
|
||||
_loc6_.clear();
|
||||
_loc6_.beginGradientFill("radial",[8421504,8421504,8421504],[1,0,1],[128,192,255],_loc1_);
|
||||
_loc6_.drawCircle(0,0,radius);
|
||||
_loc6_.endFill();
|
||||
var _loc3_:Sprite = new Sprite();
|
||||
_loc6_ = _loc3_.graphics;
|
||||
_loc6_.clear();
|
||||
_loc6_.beginFill(8421504);
|
||||
_loc6_.drawRect(-radius,-radius,radius * 2,radius * 2);
|
||||
_loc6_.endFill();
|
||||
_loc3_.addChild(_loc2_);
|
||||
_loc4_.rotation = 90;
|
||||
_loc4_.blendMode = "add";
|
||||
_loc2_.addChild(_loc4_);
|
||||
_loc2_.addChild(_loc5_);
|
||||
return _loc3_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user