Пример #1
0
 public Repeat(FinateTimeAction action, uint times)
     : base(action.Duration * times)
 {
     Times = times;
     Total = 0;
     InnerAction = action;
 }
Пример #2
0
 public SimpleLoadingScreen()
 {
     _showAction = new FadeIn(.3f);
     _hideAction = _showAction.Reverse();
     _frame = SkidiGame.ResourceManager.GetFrame("$px");
     Scale = SkidiGame.ScreenBounds.Size.ToVector2();
 }
Пример #3
0
 public override FinateTimeAction Reverse()
 {
     var result = new FinateTimeAction[InnerActions.Length];
     for (int i = 0; i < InnerActions.Length; i++)
         result[i] = InnerActions[i].Reverse();
     return new Parallel(result);
 }
Пример #4
0
 public Eagle()
     : base(new Animation(0.05f, "eagle0", "eagle1", "eagle2",
     "eagle3", "eagle4", "eagle5",
     "eagle6", "eagle7"), new Vector2(SkidiGame.ScreenBounds.Width*.4f, 0), Vector2.Zero)
 {
     _animate = new RepeatForever(new Animate(Animation));
     _defaultPosition = new Vector2(-SkidiGame.ScreenBounds.Width * .4f, 0f);
     Reset();
 }
Пример #5
0
        public RepeatActionState(Drawable target, Repeat action)
            : base(target, action)
        {
            _innerAction = action.InnerAction;
            _innerActionState = (FinateTimeActionState) _innerAction.StartAction(target);

            _times = action.Times;
            _total = action.Total;

            _nextDt = _innerAction.Duration/Duration;
        }
Пример #6
0
 public EaseSineOut(FinateTimeAction innerAction)
     : base(innerAction)
 {
 }
Пример #7
0
 public EaseElasticInOut(FinateTimeAction action, float period = 0.3f)
     : base(action, period)
 {
 }
Пример #8
0
 public EaseExponentialOut(FinateTimeAction innerAction)
     : base(innerAction)
 {
 }
Пример #9
0
 protected ActionEase(FinateTimeAction innerAction)
     : base(innerAction.Duration)
 {
     InnerAction = innerAction;
 }
Пример #10
0
 public EaseOut(FinateTimeAction innerAction, float rate)
     : base(innerAction, rate)
 {
 }
Пример #11
0
 protected EaseElastic(FinateTimeAction action, float period = .3f)
     : base(action)
 {
     Period = period;
 }
Пример #12
0
 public EaseCustom(FinateTimeAction innerAction, Func<float, float> easeFunc)
     : base(innerAction)
 {
     InnerFunc = easeFunc;
 }
Пример #13
0
 public RunAction(FinateTimeAction action)
 {
     InnerAction = action;
 }
Пример #14
0
 public EaseBounceInOut(FinateTimeAction innerAction)
     : base(innerAction)
 {
 }
Пример #15
0
 public EmptyActionState(Drawable target, FinateTimeAction action)
     : base(target, action)
 {
 }
Пример #16
0
 public RunActionState(Drawable target, RunAction action)
     : base(target, action)
 {
     _action = action.InnerAction;
 }
Пример #17
0
        public Smoke(Vector2 offset)
        {
            Frame = SmokeFrame;
            Size *= SkidiBirdGame.Scale;

            _offset = offset;

            _scaleStart = new Vector2(.8f + (float)Random.NextDouble() * .2f);
            var scaleDelta = new Vector2((float)Random.NextDouble() * .4f + 4f);

            var rotateTo = (float)Random.NextDouble() * 120 + 60;

            _animation = new Sequence(new Parallel(new ScaleTo(.4f, scaleDelta), new RotateBy(.4f, rotateTo)),
                new FadeOut(.3f));
        }
Пример #18
0
        public Star(int startDegrees)
        {
            Frame = StarFrame;
            Size *= SkidiBirdGame.Scale;

            var duration = .3f + (float)Random.NextDouble()*.4f;
            var maxDest = 300 * SkidiBirdGame.Scale;

            var radians = MathHelper.ToRadians(Random.Next(startDegrees, startDegrees+45));
            var velocity = new Vector2(maxDest, 0).Rotate(radians)*(duration / .7f);

            Rotation = radians;
            _animation = new Sequence(new MoveTo(duration, velocity), new FadeOut(.3f));
        }
Пример #19
0
 protected FinateTimeActionState(Drawable target, FinateTimeAction action)
     : base(target, action)
 {
     Duration = action.Duration;
     Elapsed = 0.0f;
 }
Пример #20
0
 protected EaseRateAction(FinateTimeAction innerAction, float rate)
     : base(innerAction)
 {
     Rate = rate;
 }
Пример #21
0
 public EaseBackIn(FinateTimeAction innerAction)
     : base(innerAction)
 {
 }