Ejemplo n.º 1
0
 public override void SafeSetDefaults()
 {
     Chain = new VerletChain(16, false, projectile.Center, 16)
     {
         constraintRepetitions = 2,             //defaults to 2, raising this lowers stretching at the cost of performance
         drag         = 2f,                     //This number defaults to 1, Is very sensitive
         forceGravity = new Vector2(0f, 0.25f), //gravity x/y
         scale        = 0.6f
     };
 }
Ejemplo n.º 2
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;
        }
Ejemplo 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),
                };
            }
        }