public Camera(Vector2 pos, Vector2 bounds, float maxSpeed, GameObject target) { this.Target = target; this.MaxSpeed = maxSpeed; this.pos = pos; this.bounds = bounds; }
public SpeechBubble(GameObject target, int objectDistance, string text) { this.Text = text; this.target = target; this.objectDistance = objectDistance; this.width = 2 * TEXT_BUFFER + (int)fntSpeech.MeasureString(text).X; this.height = 2 * TEXT_BUFFER + (int)fntSpeech.MeasureString(text).Y; topLeft = target.Position - Vector2.UnitX * (objectDistance + width) - Vector2.UnitY * (objectDistance + height); center = new Vector2(topLeft.X + (float)width / 2, (float)topLeft.Y + height / 2); arrowPosition = center; }
public bool ContainsObject(GameObject obj) { return area.Contains(new Point((int)obj.Position.X, (int)obj.Position.Y)); }
public void CreateObject(GameObject obj) { toAdd.Add(obj); }