Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Terraria;
- using Terraria.DataStructures;
- using Terraria.GameInput;
- using Terraria.ID;
- using Terraria.ModLoader;
- using Terraria.ModLoader.IO;
- using static Terraria.ModLoader.ModContent;
- namespace TutorialMod
- {
- public class Tutorialplayer : ModPlayer
- {
- public override void ProcessTriggers(TriggersSet triggersSet) {
- if (TutorialMod.ExplodeHotKey.JustPressed) {
- public override void Kill(int timeLeft)
- {
- Vector2 position = projectile.Center;
- Main.PlaySound(SoundID.Item14, (int)position.X, (int)position.Y);
- int radius = 20;
- for (int x = -radius; x <= radius; x++)
- {
- for (int y = -radius; y <= radius; y++)
- {
- int xPosition = (int)(x + position.X / 16.0f);
- int yPosition = (int)(y + position.Y / 16.0f);
- if (Math.Sqrt(x * x + y * y) <= radius + 0.5) /
- {
- WorldGen.KillTile(xPosition, yPosition, false, false, false);
- Dust.NewDust(position, 22, 22, DustID.Smoke, 0.0f, 0.0f, 120, new Color(), 1f);
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement