protected override ImageParams GetTextureDrawData(GsVector offset) { OutsideInside outin = GetOutsideInsideBounds(offset); var bounds = outin.Outside; var inside = outin.Inside; var wtower = GetImage(); GsSize imgSize = ImageProvider.GetSize(wtower); GsSize actSize = new GsSize(bounds.Width - Pad, inside.Height); GsVector scale = Calculator.ComputeScale(imgSize, actSize); GsVector imgCenter = imgSize.ToVector() * .5f; GsVector myCenter = actSize.ToVector() * .5f; return(new ImageParams(wtower, imgSize, inside.Location + myCenter, imgCenter, scale)); }
public void Draw(DrawParams dparams) { OutsideInside outin = GetOutsideInsideBounds(dparams.Offset); var bounds = outin.Outside; var inside = outin.Inside; DrawBackground(dparams, bounds, inside); if (State == PieceState.Idle) { DrawWeaponBase(dparams, bounds, inside); DrawWeaponTower(dparams, dparams.Offset); DrawCurrentLevel(dparams, bounds, inside); } else if (State == PieceState.Selling || State == PieceState.Upgrading) { DrawProgressState(dparams, bounds, inside); } }