예제 #1
0
파일: NPCObject.cs 프로젝트: jsnklpn/JGame
        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;
        }
예제 #2
0
 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;
 }
예제 #3
0
파일: NPCObject.cs 프로젝트: jsnklpn/JGame
 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;
 }
예제 #4
0
        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;
            }
        }
예제 #5
0
        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;
            }
        }
예제 #6
0
파일: NPCObject.cs 프로젝트: jsnklpn/JGame
        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;
        }
예제 #7
0
파일: NPCObject.cs 프로젝트: jsnklpn/JGame
 public void FollowWaypoints(Point[] waypoints)
 {
     this.waypoints = waypoints;
     this.movement = NPCMovementType.Waypoints;
 }
예제 #8
0
파일: NPCObject.cs 프로젝트: jsnklpn/JGame
 public void FollowRandom()
 {
     this.movement = NPCMovementType.Random;
 }
예제 #9
0
파일: NPCObject.cs 프로젝트: jsnklpn/JGame
 public void FollowObject(Object2D obj)
 {
     this.objectToFollow = obj;
     this.movement = NPCMovementType.FollowObject;
 }
예제 #10
0
파일: NPCObject.cs 프로젝트: jsnklpn/JGame
 public void FollowNormal()
 {
     this.movement = NPCMovementType.Normal;
 }
예제 #11
0
파일: NPCObject.cs 프로젝트: jsnklpn/JGame
 public void DontMove()
 {
     this.movement = NPCMovementType.DontMove;
 }
예제 #12
0
 public void FollowNormal()
 {
     this.movement = NPCMovementType.Normal;
 }
예제 #13
0
 public void FollowRandom()
 {
     this.movement = NPCMovementType.Random;
 }
예제 #14
0
 public void FollowWaypoints(Point[] waypoints)
 {
     this.waypoints = waypoints;
     this.movement  = NPCMovementType.Waypoints;
 }
예제 #15
0
 public void DontMove()
 {
     this.movement = NPCMovementType.DontMove;
 }
예제 #16
0
 public void FollowObject(Object2D obj)
 {
     this.objectToFollow = obj;
     this.movement       = NPCMovementType.FollowObject;
 }