XCom.Type7File.DrawFast C# (CSharp) Method

DrawFast() public method

public DrawFast ( Surface target, int x, int y, int width, int height, int frame, Direction dir ) : void
target Surface
x int
y int
width int
height int
frame int
dir Direction
return void
		public void DrawFast(Surface target,int x, int y,int width,int height,int frame,Direction dir)
		{		
			north[dir,frame].DrawFast(target,x,y-PckImage.Width/2,width,height);
			south[dir,frame].DrawFast(target,x,y,width,height);
			east[dir,frame].DrawFast(target,x+PckImage.Width/2,y-PckImage.Width/4,width,height);
			west[dir,frame].DrawFast(target,x-PckImage.Width/2,y-PckImage.Width/4,width,height);		
		}
#else

Usage Example

Esempio n. 1
0
        public override void DrawFast(Surface target, int x, int y, int width, int height)
        {
            double currentTime = DXTimer.GetCurrMillis();

            if (lastTime + refresh < currentTime)
            {
                curr     = (curr + 1) % images.NumFrames;
                lastTime = currentTime;
            }

            if (!dying)
            {
                images.DrawFast(target, x, y, width, height, curr, (Direction)direction);
            }
            //else
            //	images.Death[dieFrame].DrawFast(target,x,y,width,height);
        }