private bool Follow(Dust dust, BloodAnchor follow) { NPC npc = follow.anchor; if (follow.counter++ >= STICK_TIME || !npc.active) { if (npc.active) { dust.velocity = npc.velocity + 0.5f * (follow.offset.RotatedBy(npc.rotation) - follow.offset.RotatedBy(follow.oldRotation)); } dust.customData = null; dust.noGravity = false; return(false); } Vector2 c = npc.Center; dust.scale = BASE_SCALE + follow.counter * GROW_RATE; dust.position = c + follow.offset.RotatedBy(npc.rotation); follow.oldRotation = (dust.rotation = npc.rotation); return(true); }
private bool Follow(Dust dust, BloodAnchor follow) { NPC npc = follow.anchor; if (follow.counter++ >= stickTime || !npc.active) { if (npc.active) { dust.velocity = npc.velocity + 0.5f * (follow.offset.RotatedBy(npc.rotation) - follow.offset.RotatedBy(follow.oldRotation)); } dust.customData = null; dust.noGravity = false; return(false); } dust.scale = baseScale + follow.counter * growRate; dust.position = npc.Center + follow.offset.RotatedBy(npc.rotation); follow.oldRotation = dust.rotation = npc.rotation; return(true); }