Esempio n. 1
0
        public BodyHandler(VitricBoss parent)
        {
            this.parent = parent;

            Vector2 end = new Vector2(parent.arena.Center.X, parent.arena.Bottom); //WIP, dunno how this works yet - will not change anything in-game

            chain = new VerletChain(9, true, parent.npc.Center, end, 5, Vector2.UnitY, false, null, true, new List <int>()
            {
                100, 100, 48, 36, 36, 32, 32, 32, 32
            });
            chain.drag = 1.1f;
        }
 public void findParent()
 {
     for (int i = 0; i < Main.maxNPCs; i++)
     {
         NPC npc = Main.npc[i];
         if (npc.active && npc.type == ModContent.NPCType<VitricBoss>())
         {
             Parent = npc.modNPC as VitricBoss;
             return;
         }
     }
 }
Esempio n. 3
0
        public VitricBossSwoosh(Vector2 offset, int length, VitricBoss parent)
        {
            position    = offset;
            this.parent = parent;

            if (!Main.dedServ)
            {
                fireEffect = Filters.Scene["FireShader"].GetShader().Shader;

                chain = new VerletChain(length, true, parent.npc.Center + position, 8)
                {
                    constraintRepetitions = 2,
                    drag         = 1.5f,
                    forceGravity = new Vector2(0f, 0.25f),
                };
            }
        }