Мой террариум мод не работает
Я получаю эту ошибку:
ошибка CS0103: имя "методы" не существует в текущем контексте
Мой код:
using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace SwordsMod.NPCs.Bosses { public class Optime : ModNPC { int attackTimer = 0; int spread1timer = 150; int spread2timer = 151; int rapid1timer = 151; int rapid2timer = 151; public override void SetStaticDefaults() { DisplayName.SetDefault("O P T I M E"); Main.npcFrameCount[npc.type] = Main.npcFrameCount[3]; } public override void SetDefaults() { npc.width = 78; npc.height = 104; npc.damage = 999999; npc.defense = 8; npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath1; npc.value = 0f; npc.knockBackResist = 0f; npc.aiStyle = -1; animationType = -1; npc.boss = true; npc.noGravity = true; npc.noTileCollide = true; npc.aiStyle = -1; npc.lifeMax = Main.expertMode ? 3000 : 5000; } int useJitterMethod = 1; //set this to 1 for method 1 set it to 2 for method 2 //variables used for both methods Vector2 moveTo; float flyDirection; //settings for both methods float heightAbovePlayer = 200; //variables used for jitter method 1 //settings for jitter method 1 float acceleration = .8f; // acceleration rate float maxSpeed = 7f; //max speed //variables used for jitter method 2 float currentFlyDirection; //settings for jitter method 2 float speed = 12; //how fast it moves float rotationSpeed = 20; //rotation speed in degrees per frame public override void AI() { //look at stuff.cs for information on the SlowRotation and PolarVector Player player = Main.player[npc.target]; npc.TargetClosest(true); moveTo = new Vector2(player.Center.X, player.Center.Y - heightAbovePlayer); flyDirection = (moveTo - npc.Center).ToRotation(); if (useJitterMethod == 1)//jitter method 1 Acceleration { npc.velocity = Methods.PolarVector(acceleration, flyDirection); if (npc.velocity.Length() > maxSpeed) { npc.velocity = npc.velocity.SafeNormalize(-Vector2.UnitY) * maxSpeed; } } if (useJitterMethod == 2) //jitter method 2 slowed direction change { currentFlyDirection = Methods.SlowRotation(currentFlyDirection, flyDirection, rotationSpeed); npc.velocity = Methods.PolarVector(speed, currentFlyDirection); } attackTimer++; if (attackTimer == 300) { switch (Main.rand.Next(1, 5)) { case 1: { spread1timer = 0; break; } case 2: { spread2timer = 0; break; } case 3: { rapid1timer = 0; break; } case 4: { rapid2timer = 0; break; } } attackTimer = 0; } spread1timer++; if (spread1timer == 30 || spread1timer == 60 || spread1timer == 90 || spread1timer == 120 || spread1timer == 150) { for (int i = 0; i < 10; i++) { float Speed = 12f; int type = mod.ProjectileType("Happfiier"); float rotation = ((((float)Math.PI / 5) * i) + (float)Math.Atan2(npc.Center.Y - 10, npc.Center.X - 10)); int proj = Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)((Math.Cos(rotation) * Speed) * -1), (float)((Math.Sin(rotation) * Speed) * -1), type, 999999, 0f, 0); Main.projectile[proj].tileCollide = false; } } } public override void FindFrame(int frameHeight) { npc.spriteDirection = 0; npc.rotation = 0; npc.spriteDirection = npc.direction; npc.frameCounter++; if (npc.frameCounter >= 8) // ticks per frame { npc.frame.Y = (npc.frame.Y / frameHeight + 1) % Main.npcFrameCount[npc.type] * 104; npc.frameCounter = 0; } } } }
Что я уже пробовал:
Я попробовал прописные буквы, орфографию, но ничего не получилось.