Ejemplo n.º 1
0
            public TubeStateInitialize(Tube owner)
                : base(owner)
            {
                _scale = 0f;
                _rate  = 0.05f;
                //_origin = new Vector2(Owner.Width / (float)2, Owner.Height / (float)2);
                _origin   = new Vector2(20, 20);
                _position = new Vector2(Owner.X + Owner.Width / 2, Owner.Y + Owner.Height / 2);

                Owner.InternalInputs = TubeInputsHelper.Tubes[Random.Next(0, TubeInputsHelper.Tubes.Length)];
            }
Ejemplo n.º 2
0
            public TubeStateFade(Tube owner)
                : base(owner)
            {
                _alpha = 1.0f;
                _rate  = 0.02f;

                _destination = new Rectangle
                               (
                    Owner.X,
                    Owner.Y,
                    Owner.Width,
                    Owner.Height
                               );
            }
Ejemplo n.º 3
0
            public TubeStateRotate(Tube owner, RotationDirection direction)
                : base(owner)
            {
                _direction = direction;

                _rotation = 0;

                _rotationRate =
                    direction == RotationDirection.Clockwise
                        ? MathHelper.ToRadians(15)
                        : MathHelper.ToRadians(-15);

                _destination = new Rectangle
                               (
                    Owner.X + Owner.Width / 2,
                    Owner.Y + Owner.Height / 2,
                    Owner.Width,
                    Owner.Height
                               );

                _origin = new Vector2(Owner.GetSourceRectangle().Width / (float)2, Owner.GetSourceRectangle().Height / (float)2);
            }
Ejemplo n.º 4
0
 protected TubeState(Tube owner)
 {
     Owner = owner;
 }
Ejemplo n.º 5
0
 public TubeStateNormal(Tube owner)
     : base(owner)
 {
     _destination = new Rectangle(Owner.X, Owner.Y, Owner.Width, Owner.Height);
 }