Ejemplo n.º 1
0
        private void timer_Tick(object sender, EventArgs e)
        {
            ThisTuple <bool, Bitmap> frame = this._waterwave.GetFrame();
            bool flag = !frame.Item1;

            if (flag)
            {
                this._waterwave.DropStone(this._waterwave.GetNextRadomPos());
            }
            base.Image = frame.Item2;
        }
Ejemplo n.º 2
0
        public ThisTuple <bool, Bitmap> GetFrame()
        {
            bool flag = this._rippleCount == 0;
            ThisTuple <bool, Bitmap> result;

            if (flag)
            {
                result = new ThisTuple <bool, Bitmap>(false, this._newImage);
            }
            else
            {
                this.RippleSpread();
                this.RenderRipple();
                this._rippleCount--;
                result = new ThisTuple <bool, Bitmap>(true, this._newImage);
            }
            return(result);
        }