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)]; }
public TubeStateFade(Tube owner) : base(owner) { _alpha = 1.0f; _rate = 0.02f; _destination = new Rectangle ( Owner.X, Owner.Y, Owner.Width, Owner.Height ); }
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); }
protected TubeState(Tube owner) { Owner = owner; }
public TubeStateNormal(Tube owner) : base(owner) { _destination = new Rectangle(Owner.X, Owner.Y, Owner.Width, Owner.Height); }