using System;
using Microsoft.DirectX.DirectDraw;
using Global;
using Global.GlobalClass;
using KillerInstinct.DirectX;
namespace KillerInstinct.Sprites{
public class DamageClass : SpriteClass
{
public const int FIRE = 0;
public DamageClass(string file, float x, float y, int Width, int Height, int FramesCount, int FramePerRow)
{
frame.Width = Width;
frame.Height = Height;
framesCount = FramesCount;
framesPerRow = FramePerRow;
whichFrame = global.random(0, framesCount-1);
layer = LAYER_TOP;
Init(file, CONST.COLORKEY_BLACK, x, y);
}
public override void Update()
{
if (whichFrame < framesCount-1) whichFrame++;
else whichFrame = 0;
}
public override void ReactToCollision(SpriteClass s)
{
}
// gets the damage rsource name
public static string GetDamageResource(int which)
{
return (CONST.DIR_BITMAP + "Damage" + which + ".bmp");
}
}
}
|