private void initialize(double spread, ILocationEquation center, ILocationEquation left, ILocationEquation right) { this.center = center; this.left = left; this.right = right; this.spread = spread; }
public Piece(ILocationEquation equation, long duration, double angleOffset, double speed) { this.equation = equation; this.duration = duration; this.angleOffset = angleOffset; this.speed = speed; }
public Path makePath(Vector2 startLocation, PathData pathData) { ILocationEquation locationEquation = getEquation(pathData.equationType); Path p = new BasicPath(locationEquation, startLocation, pathData.angleOffset, pathData.speed); return(p); }
/// <summary> /// /// </summary> /// <param name="locationEquation"> The ILocationEquation to use to update the location</param> /// <param name="initialLocation"> The starting location of the object</param> /// <param name="AngleOffset"> The input angle should be in radians and will go clockwise starting in the x direction</param> public BasicPath(ILocationEquation locationEquation, Vector2 initialLocation, double AngleOffset, double speedRatio = 1) { _locationEquation = locationEquation; _speedRatio = speedRatio; _initialLocation = initialLocation; Offset = initialLocation - locationEquation.GetLocation(0); this.AngleOffset = AngleOffset; StartTime = Clock.getClock().getTime(); }
public BasicPath(BasicPath path, Vector2 initialLocation, double AngleOffset, double speedRatio = 1) { _locationEquation = path._locationEquation; _speedRatio = speedRatio; Offset = initialLocation - _locationEquation.GetLocation(0); this.AngleOffset = AngleOffset; this.StartTime = Clock.getClock().getTime(); }
public Path makePath(Vector2 startLocation, List <PathData> pathData) { PiecewisePath p = new PiecewisePath(startLocation); foreach (var pData in pathData) { ILocationEquation equation = getEquation(pData.equationType); p.AddToPath(equation, pData.pathDuration, pData.angleOffset, pData.speed); } return(p); }
public ShotgunBulletFactory(double spread, ILocationEquation center, ILocationEquation left, ILocationEquation right) { initialize(spread, center, left, right); }
public ShotgunBulletFactory(double spread, ILocationEquation general) { initialize(spread, general, general, general); }
/// <summary> /// Adds onto the end of the path. /// </summary> /// <param name="equation"></param> Equation that will be used during it's time period. /// <param name="duration"></param> How long the path should be used for. /// <param name="angleOffset"></param> Angle in radians. /// <param name="speed"></param> Speed ratio, 1 is normal speed. public void AddToPath(ILocationEquation equation, long duration, double angleOffset, double speed) { Piece p = new Piece(equation, duration, angleOffset, speed); pieces.AddLast(p); }
public SingleBulletFactory(ILocationEquation pathToFollow) { this.path = pathToFollow; this.width = width; this.height = height; }
/* * TODO: IMPLEMEMENT GUN TO FOLLOW SPECIFIC SHAPE/PATTERN EQUATION */ public BossGun(Vector2 startingLoc, int delay, BulletFactory factory, float direction, ILocationEquation shape, Texture2D texture, TEAM team) : base(delay, texture, factory, team) { Location = startingLoc; this.delay = delay; this.bfactory = factory; this.direction = direction; base.fireAngleOffset = Math.PI / 2; path = (SpiralLocationEquation)shape; }
public MovingBulletFactory(BulletFactory bulletFactory, ILocationEquation pathToFollow) { this.pathLocationEquation = pathToFollow; this.path = new BasicPath(pathToFollow, Vector2.Zero, 0, 1); this.bulletFactory = bulletFactory; }
public RotatedLocationEquation(ILocationEquation locationEquation, double angle) { this.equation = locationEquation; this.angle = angle; }
public BulletCollidingBullet(int damage, ILocationEquation locationEquation, Texture2D texture, Vector2 startLocation, TEAM team) : base(damage, locationEquation, texture, startLocation, team) { }