public void FollowSineWave(bool vertical, int amplitude, int wavelength) { this.amplitude = amplitude; this.wavelength = wavelength; if (vertical) this.movement = NPCMovementType.SineWaveVertical; else this.movement = NPCMovementType.SineWaveHorizontal; }
public NPCObject(System.Drawing.Image image, int initialHealth = 100) : base(image, System.Drawing.Point.Empty) { this.rand = new Random(); this.amplitude = 0; this.wavelength = 0; this.waypoints = null; this.objectToFollow = null; this.movement = NPCMovementType.Normal; this.health = initialHealth; this.maxVelocity = 100f; }
public void FollowZigZag(bool vertical, int amplitude, int wavelength) { this.amplitude = amplitude; this.wavelength = wavelength; if (vertical) { this.movement = NPCMovementType.ZigZagVertical; } else { this.movement = NPCMovementType.ZigZagHorizontal; } }
public void FollowSineWave(bool vertical, int amplitude, int wavelength) { this.amplitude = amplitude; this.wavelength = wavelength; if (vertical) { this.movement = NPCMovementType.SineWaveVertical; } else { this.movement = NPCMovementType.SineWaveHorizontal; } }
public void FollowZigZag(bool vertical, int amplitude, int wavelength) { this.amplitude = amplitude; this.wavelength = wavelength; if (vertical) this.movement = NPCMovementType.ZigZagVertical; else this.movement = NPCMovementType.ZigZagHorizontal; }
public void FollowWaypoints(Point[] waypoints) { this.waypoints = waypoints; this.movement = NPCMovementType.Waypoints; }
public void FollowRandom() { this.movement = NPCMovementType.Random; }
public void FollowObject(Object2D obj) { this.objectToFollow = obj; this.movement = NPCMovementType.FollowObject; }
public void FollowNormal() { this.movement = NPCMovementType.Normal; }
public void DontMove() { this.movement = NPCMovementType.DontMove; }