Terraria.TargetDummy.Activate C# (CSharp) Method

Activate() public method

public Activate ( ) : void
return void
        public void Activate()
        {
            int index = NPC.NewNPC((int)this.x * 16 + 16, (int)this.y * 16 + 48, 488, 100, 0.0f, 0.0f, 0.0f, 0.0f, (int)byte.MaxValue);
            Main.npc[index].ai[0] = (float)this.x;
            Main.npc[index].ai[1] = (float)this.y;
            Main.npc[index].netUpdate = true;
            this.npc = index;
            if (Main.netMode == 1)
                return;
            NetMessage.SendData(86, -1, -1, "", this.whoAmI, (float)this.x, (float)this.y, 0.0f, 0, 0, 0);
        }