using System;
using System.Drawing;
using Microsoft.DirectX.DirectDraw;
using Global;
using Global.GlobalClass;
using System.Threading;
using KillerInstinct.DirectX;
namespace KillerInstinct.Sprites{
public class ExplosionClass : SpriteClass
{
public int Delay=0;
public ExplosionClass(string file, float x, float y)
{
// sprite attributes
frame.Width = 98;
frame.Height = 98;
framesCount = 8;
framesPerRow = 4;
layer = LAYER_EXPLOSION;
// starting direction
whichFrame = 0;
// staring speed
speed = 0;
// collisionType
collisionType = CollisionType.NoCollision;
Init(file, CONST.COLORKEY_WHITE, x, y);
}
public override void Update()
{
if (Delay == 10)
{
if (whichFrame < 7) whichFrame++;
else global.spriteList.Delete(this);
Delay = 0;
}
else
{
Delay++;
}
}
public override void ReactToCollision(SpriteClass s)
{
}
}
}
|