public Portal(IMovingTrajectory movingTrajectory, Vector2 size, float rotation, Color?color = null, SpriteEffects spriteEffects = SpriteEffects.None, float depth = 0.5F) : base(movingTrajectory, defaultSprite, size, rotation, color, spriteEffects, depth) { topFrame = new Frame(this, 0f); bottomFrame = new Frame(this, (float)Math.PI); polygon = new Polygon(Vector2.Zero, size, 0f); particlesDrawer = new PortalParticlesDrawer(this, Color); }
public IMovingTrajectory GetMovingTrajectory() { IMovingTrajectory movingTrajectory = null; switch (MovingType) { case MovingType.Circle: movingTrajectory = new MovingCircle(Center, Radius, CirclePeriod, CircleAngle); break; case MovingType.Linear: movingTrajectory = new MovingLine(FirstPosition, SecondPosition, LinearPeriod, LinearTime); break; case MovingType.Static: movingTrajectory = new MovingStatic(Position); break; } return(movingTrajectory); }
public MapObject(IMovingTrajectory movingTrajectory, Texture2D sprite, Vector2 size, float rotation, Color?color = null, SpriteEffects spriteEffects = SpriteEffects.None, float depth = 0.5F) : base(sprite, movingTrajectory.GetPosition(0f), size, rotation, color, spriteEffects, depth) { this.movingTrajectory = movingTrajectory; }
public Star(IMovingTrajectory movingTrajectory, Vector2 size, float rotation, Color?color = null, SpriteEffects spriteEffects = SpriteEffects.None, float depth = 0.5F) : base(movingTrajectory, defaultSprite, size, rotation, color, spriteEffects, depth) { players = new List <IGameObject>(); }
public Finish(IMovingTrajectory movingTrajectory, Vector2 size, float rotation, Color?color = null, SpriteEffects spriteEffects = SpriteEffects.None, float depth = 0.5F) : base(movingTrajectory, defaultSprite, size, rotation, color == new Color(0, 0, 0, 0) ? defaultColor : color, spriteEffects, depth) { }
public Gravity(float gravityPower, IMovingTrajectory movingTrajectory, Vector2 size, float rotation, SpriteEffects spriteEffects = SpriteEffects.None, float depth = 0.5F) : base(movingTrajectory, defaultSprite, size, rotation, Color.Black, spriteEffects, depth) { this.gravityPower = gravityPower; particlesDrawer = new GravityParticlesDrawer(this); }