TheBestPortato24
Terrarian
I'm getting an error message: error CS0115 "LemonDemon.SetDefauts" no suitable method to override warnings. Here is my code for y'all.
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace SwordTest.NPCs
{
public class LemonDemon : ModNPC
{
public override void SetDefauts()
{
npc.name = "LemonDemon";
npc.displayname = "Lemon Demon";
npc.width = 42;
npc.width = 31;
npc.damage = 42;
npc.defense = 8;
npc.lifemax = 120;
npc.soundhit = 21;
npc.soundkilled = 24;
npc.value = 60f;
npc.knockBackResist = 0.8;
npc.aiStyle = 14;
main.npcFrameCount[npc.type] = 3;
aiType = NPCID.Demon;
animationType = NPCID.Demon;
}
public override float CanSpawn(NPCSpawnInfo spawnInfo)
{
return spawnInfo.spawnTileY < Main.maxTilesY - 200 && !Main.dayTime ? 0.5f : 0.5f;
}
public override void FindFrame(int frameHeight)
{
npc.frameCounter -= 0.8f;
npc.frameCounter %= Main.npcFrameCount[npc.type];
int frame = (int)NPCs.frameCounter;
npc.frame.Y = frame * frameHeight;
npc.spriteDirection = npc.direction;
}
public override void NPCLoot()
{
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("Lemon"), 3);
}
}
}
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace SwordTest.NPCs
{
public class LemonDemon : ModNPC
{
public override void SetDefauts()
{
npc.name = "LemonDemon";
npc.displayname = "Lemon Demon";
npc.width = 42;
npc.width = 31;
npc.damage = 42;
npc.defense = 8;
npc.lifemax = 120;
npc.soundhit = 21;
npc.soundkilled = 24;
npc.value = 60f;
npc.knockBackResist = 0.8;
npc.aiStyle = 14;
main.npcFrameCount[npc.type] = 3;
aiType = NPCID.Demon;
animationType = NPCID.Demon;
}
public override float CanSpawn(NPCSpawnInfo spawnInfo)
{
return spawnInfo.spawnTileY < Main.maxTilesY - 200 && !Main.dayTime ? 0.5f : 0.5f;
}
public override void FindFrame(int frameHeight)
{
npc.frameCounter -= 0.8f;
npc.frameCounter %= Main.npcFrameCount[npc.type];
int frame = (int)NPCs.frameCounter;
npc.frame.Y = frame * frameHeight;
npc.spriteDirection = npc.direction;
}
public override void NPCLoot()
{
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("Lemon"), 3);
}
}
}