public override void RightClick(Player player) { if (UIWormhole.Visible) { UIWormhole.Close(); } else { UIWormhole.Open(item, false); } item.stack++; }
public override void RightClick(Player player) { Main.PlaySound(SoundID.MenuOpen); if (UIWormhole.Visible) { UIWormhole.Close(); } else { UIWormhole.Open(item); } item.stack++; }
public override bool CanUseItem(Player player) { if (player.altFunctionUse == 2) { if (UIWormhole.Visible) { UIWormhole.Close(); } else { UIWormhole.Open(item, false); } return(true); } return(false); }
public override bool UseItem(Player player) { if (player.altFunctionUse == 2) { if (UIWormhole.Visible) { UIWormhole.Close(); } else { UIWormhole.Open(item); } return(true); } if (Main.rand.Next(2) == 0) { Dust.NewDust(player.position, player.width, player.height, 15, 0.0f, 0.0f, 150, Color.White, 1.1f); } if (player.itemAnimation == item.useAnimation / 2) { for (int index = 0; index < 70; ++index) { Dust.NewDust(player.position, player.width, player.height, 15, (float)(player.velocity.X * 0.5), (float)(player.velocity.Y * 0.5), 150, Color.White, 1.5f); } player.grappling[0] = -1; player.grapCount = 0; for (int index = 0; index < 1000; ++index) { if (Main.projectile[index].active && Main.projectile[index].owner == player.whoAmI && Main.projectile[index].aiStyle == 7) { Main.projectile[index].Kill(); } } player.Spawn(); for (int index = 0; index < 70; ++index) { Dust.NewDust(player.position, player.width, player.height, 15, 0.0f, 0.0f, 150, Color.White, 1.5f); } } return(false); }