public SwitchStateData(SwitchBlockMulti ParentBlock, int pInvokeID, String pHitSound, Color pStateColor) { StateColor = pStateColor; HitSound = pHitSound; InvokeID = pInvokeID; RebuildImage(ParentBlock); }
public void RebuildImage(SwitchBlockMulti Source) { Image tActiveImage = new Bitmap((int)Source.BlockRectangle.Width, (int)Source.BlockRectangle.Height); Image tInactiveImage = new Bitmap((int)Source.BlockRectangle.Width, (int)Source.BlockRectangle.Height); using (Graphics A = Graphics.FromImage(tActiveImage)) { using (Graphics I = Graphics.FromImage(tInactiveImage)) { Image gummyActive = BCBlockGameState.GetGummyImage(StateColor, tActiveImage.Size); Image SwitchOverlay = BCBlockGameState.Imageman.getLoadedImage("SwitchOverlay"); A.DrawImageUnscaled(gummyActive, 0, 0); A.DrawImage(SwitchOverlay, 0, 0, tActiveImage.Width, tActiveImage.Height); StateImage = tActiveImage; } } }
public SwitchBlockMulti(SwitchBlockMulti clonethis) : base(clonethis) { _SwitchData = clonethis.SwitchData; _State = clonethis.State; _Locked = clonethis.Locked; flInitialized = true; }