public void GetBytes(Contact.Bytes bytes, Vector POV = null) { //if POV is null, we send this rect as part of a model; otherwise, we send it to print on the screen bytes.Add(POV == null ? position : position - POV); bytes.Add(size); bytes.Add(texture); bytes.Add(angle); }
public void GetBytes(Contact.Bytes b, Vector POV) { if (Math.Abs(position.x - POV.x) > Constants.ScreenSize.x / 2 + Model.Models[modelID].BoundRadius || Math.Abs(position.y - POV.y) > Constants.ScreenSize.y / 2 + Model.Models[modelID].BoundRadius) { return; } b.Add(Model.order[modelID]); b.Add(position - POV); b.Add(angle); }
public void GetBytes(Contact.Bytes bytes, Vector POV) { if (Math.Abs(position.x - POV.x) > Constants.ScreenSize.x / 2 || Math.Abs(position.y - POV.y) > Constants.ScreenSize.y / 2) { return; } bytes.Add(text); bytes.Add(position - POV); bytes.Add(fontSize); bytes.Add(color); }