public override bool InView(Camera camera) { if (camera.scale * particle_Radius < GameConst.minimum_draw_radius) { return false; } // if index_start == index_end we have no particles left! if (index_start != index_end) { int index_recent = index_end == 0 ? count - 1 : index_end - 1; // get the position of the most recent particle.... return camera.ContainsCircle(position[index_recent], radius); } return false; }
public override bool InView(Camera camera) { return camera.ContainsCircle(pos, radius * camera.ui_feature_scale); }
public virtual bool InView(Camera camera) { return camera.ContainsCircle(pos, radius); }
public bool InView(Camera camera) { // shield not visible if alpha very low if (total_alpha < 0.05) { return false; } return camera.ContainsCircle(pos, radius); }
public override bool InView(Camera camera) { return (camera.scale * particle_Radius > GameConst.minimum_draw_radius) && this.Visible() && camera.ContainsCircle(center, radius); }
public bool InView(Camera camera) { return (camera.scale * scale.Y * resource.radius > GameConst.minimum_draw_radius) && camera.ContainsCircle(pos, resource.radius); }
// draws the red outlines of the hitbox onto screen. Kinda usefull. public override void Draw(Camera camera, Color color, float width) { if (!camera.ContainsCircle(pos, radius)) { return; } Vector2 p1 = Utility.Rotate( corners[0], angle) + pos; p1 = camera.Map(p1); Vector2 p2; for (int j = 0; j < count; j++) { int i = j + 1; if ( i == count ) { i = 0; } p2 = Utility.Rotate(corners[i], angle) + pos; p2 = camera.Map(p2); ArtPrimitive.DrawLine(p1, p2, color, width * camera.ui_feature_scale); ArtPrimitive.DrawCircle(p2, color, width * camera.ui_feature_scale); p1 = p2; } }
public override void Draw(Camera camera, Color color, float width = 2.0f) { if (!camera.ContainsCircle(pos, radius)) { return; } Vector2 center = camera.Map(pos); ArtPrimitive.DrawArc(center, 0.0f, MathHelper.TwoPi, radius * camera.scale, color, width * camera.ui_feature_scale); }