예제 #1
0
 public Observer(Color tint, Vector2 position, Entity2D target, List<Enemy> flockmates, PowerCore core)
     : base("observerEnemy", tint, position, target)
 {
     CurrentHealthPoints = MaxHealthPoints = 100;
     Path = new Flock(this, flockmates, core, target, 400, new Random().Next(75, 150));
     Scale = 1.1f;
     Speed = 290f;
     FireRate = 2.5f;
 }
예제 #2
0
        public Explosion(Entity2D explodingEntity, double destroyedGameTime)
            : base("Explosion")
        {
            DestroyedGameTime = destroyedGameTime;
            SourceRectangle = new Rectangle(0, 0, SRC_RECTANGLE_WIDTH, SRC_RECTANGLE_HEIGHT);
            CurrentFrameIndex = 0;

            ExplodingEntity = explodingEntity;
            Position = ExplodingEntity.Position;
            Origin = new Vector2(SRC_RECTANGLE_WIDTH/2, SRC_RECTANGLE_HEIGHT/2);
            Layer = ExplodingEntity.Layer;
            Rotation = ExplodingEntity.Rotation;
            SetTint(ExplodingEntity.Tint);
        }
예제 #3
0
 public Follow(CoordinateSystem entity, Entity2D target)
     : base(entity)
 {
     Target = target;
 }