예제 #1
0
 public override bool CanUseItem(Player player)
 {
     //Don't put this line into SetDefaults, or the item will break.
     item.shoot = ModContent.ProjectileType <DuskfeatherBlade>();
     if (player.altFunctionUse == 2)
     {
         if (item.useStyle == ItemUseStyleID.SwingThrow)
         {
             item.useStyle     = ItemUseStyleID.HoldingUp;
             item.noUseGraphic = false;
             item.UseSound     = null;
         }
         else
         {
             return(false);
         }
     }
     else
     {
         if (player.ownedProjectileCounts[ModContent.ProjectileType <DuskfeatherBlade>()] >= 8)
         {
             DuskfeatherBlade.AttractOldestBlade(player);
         }
         item.useStyle     = ItemUseStyleID.SwingThrow;
         item.noUseGraphic = true;
         item.UseSound     = SoundID.Item1;
     }
     return(true);
 }
예제 #2
0
 public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
 {
     if (player.altFunctionUse == 2)
     {
         DuskfeatherBlade.AttractBlades(player);
         return(false);
     }
     return(true);
 }