Exemple #1
0
 public NPCAimedTarget(NPC npc)
 {
     this.Type     = NPCTargetType.NPC;
     this.Hitbox   = npc.Hitbox;
     this.Width    = npc.width;
     this.Height   = npc.height;
     this.Position = npc.position;
     this.Velocity = npc.velocity;
 }
Exemple #2
0
 public NPCAimedTarget(NPC npc)
 {
     Type     = NPCTargetType.NPC;
     Hitbox   = npc.Hitbox;
     Width    = npc.width;
     Height   = npc.height;
     Position = npc.position;
     Velocity = npc.velocity;
 }
Exemple #3
0
 public NPCAimedTarget(Player player, bool ignoreTank = true)
 {
     Type     = NPCTargetType.Player;
     Hitbox   = player.Hitbox;
     Width    = player.width;
     Height   = player.height;
     Position = player.position;
     Velocity = player.velocity;
     if (!ignoreTank && player.tankPet > -1)
     {
         Projectile projectile = Main.projectile[player.tankPet];
         Type     = NPCTargetType.PlayerTankPet;
         Hitbox   = projectile.Hitbox;
         Width    = projectile.width;
         Height   = projectile.height;
         Position = projectile.position;
         Velocity = projectile.velocity;
     }
 }
Exemple #4
0
        public NPCAimedTarget(Player player, bool ignoreTank = true)
        {
            this.Type     = NPCTargetType.Player;
            this.Hitbox   = player.Hitbox;
            this.Width    = player.width;
            this.Height   = player.height;
            this.Position = player.position;
            this.Velocity = player.velocity;
            if (ignoreTank || player.tankPet <= -1)
            {
                return;
            }
            Projectile projectile = Main.projectile[player.tankPet];

            this.Type     = NPCTargetType.PlayerTankPet;
            this.Hitbox   = projectile.Hitbox;
            this.Width    = projectile.width;
            this.Height   = projectile.height;
            this.Position = projectile.position;
            this.Velocity = projectile.velocity;
        }