Beispiel #1
0
        public override void AI()
        {
            if (Background == null)             //init stuff
            {
                Background = new WardenBG(npc.Center, npc);
                BackgroundItemManager.AddItem(Background);

                archonWhoAmI = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y + 300, ModContent.NPCType <Archon.Archon>());

                if (Main.netMode != NetmodeID.SinglePlayer)
                {
                    NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, archonWhoAmI);
                }

                stage = EnchantStage;
            }

            npc.TargetClosest(true);
            npc.dontTakeDamage = !inFG;

            if (transitionFG)
            {
                Transition();
                return;
            }

            if (inFG)
            {
                UpdateForeground();
            }
            else
            {
                UpdateBackground();
            }
        }
Beispiel #2
0
        public override void AI()
        {
            if (Background == null)             //init stuff
            {
                Background = new ArchonBG(npc.Center, npc);
                BackgroundItemManager.AddItem(Background);

                SpiritMod.Metaballs.EnemyLayer.Sprites.Add(this);
            }

            npc.TargetClosest(true);
            npc.dontTakeDamage = !inFG;
            npc.defDamage      = npc.damage = 0;

            if (transitionFG)
            {
                Transition();
                return;
            }

            if (inFG)
            {
                UpdateForeground();
            }
            else
            {
                UpdateBackground();
            }
        }
Beispiel #3
0
        public override void AI()
        {
            if (Background == null)
            {
                Background = new StarProjBGItem(projectile.Center, projectile);
                BackgroundItemManager.AddItem(Background);
            }

            projectile.position = Background.Center;

            Z *= 1.15f;

            if (Z > 6.2f)
            {
                projectile.Kill();
            }
        }