public void SetSize(Vector2 size) { //if (Size != Vector2.Zero && Size == size) // return; Size = size; ClampManager.Update(); if (ValueHistoryManager.HasChangedFor(new ValueHistoryRecord("Size", Size))) { OnChangeRectangle?.Invoke(); } }
public virtual void Update(GameTime gameTime = null) { if (IsActive) { SetRectangle(); SetOrigin(); //if (IsPulsating) //{ // Scale = General.Pulsate(); //} //foreach (var effect in Effects) //{ // effect.Update(); //} foreach (var e in Events) { e.Update(); } ClampManager.Update(); IsHovering = InputManager.IsHovering(DestinationRectangle); if (IsClickable) { IsSelecting = InputManager.Selected(DestinationRectangle); } TestInfo.Update(); ValueHistoryManager.Update(); } }