示例#1
0
        /**
         * Shakes the camera harness
         * @param intensity How much to shake the camera (max radius for randomization off center)
         * @param pulses How make shake pulses to do before the shake effect stops.
         */
        public void shake(float intensity = 5f, int pulses = 5)
        {
            if (pulses < 1)
            {
                return;
            }

            object[] shakeArgs = new object[] { intensity };
            _shaker             = _juggler.delayCall(new shakeDelegate(doShake), CAMERA_SHAKE_INTERVAL, shakeArgs);
            _shaker.repeatCount = pulses + 1;
            _juggler.add(_shaker);
            _shaking = true;
            startMoving();
        }
示例#2
0
 public void addFrame(SMovieClip mFrame, String label)
 {
     mFrame.name = label;
     mFrames.Add(mFrame);
     addChild(mFrame);
     mJuggler.add(mFrame);
     if (mFramesCount++ == 1)
     {
         mCurrentLabel = label;
     }
     else
     {
         mFrame.visible = false;
     }
 }