mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-18 17:27: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
@@ -0,0 +1,46 @@
|
||||
package room
|
||||
{
|
||||
import flash.display.MovieClip;
|
||||
|
||||
public class RoomObject_RandomClick extends RoomObject
|
||||
{
|
||||
|
||||
private var _frameCountdown:int;
|
||||
|
||||
public function RoomObject_RandomClick(param1:MovieClip)
|
||||
{
|
||||
super(param1);
|
||||
param1.stop();
|
||||
}
|
||||
|
||||
override public function mouseDown(param1:Boolean) : void
|
||||
{
|
||||
if(_bHold == false && param1 == true)
|
||||
{
|
||||
_frameCountdown = 5 + int(Math.random() * _mc.totalFrames) / 2;
|
||||
_bHold = true;
|
||||
}
|
||||
}
|
||||
|
||||
override public function onEnterFrame() : void
|
||||
{
|
||||
if(_bHold)
|
||||
{
|
||||
_mc.gotoAndStop(_mc.totalFrames);
|
||||
if(_frameCountdown == 0)
|
||||
{
|
||||
_bHold = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
_frameCountdown = _frameCountdown - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_mc.gotoAndStop(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user