public Blood(Screen parent, Vector2 position, Color overlay, float baseSize, float sizeVar, float baseSpeed, float speedVar, float speedDamp, int lifeTime) : base(parent) { _ColourOverlay = overlay; _BaseSize = baseSize; _SizeVar = sizeVar; _BaseSpeed = baseSpeed; _SpeedVar = speedVar; _SpeedDamp = speedDamp; _LifeTime = lifeTime; _Remaining = _LifeTime; // Create collision geometry for the marine float size = (float)Application.AppReference.Random.NextDouble() * _SizeVar + _BaseSize; _Geometry = new Geometry(this, new Vector2(), size, size, 0.0f, size); // Create an animation set for the marine _Animations = new AnimationSet(); // Add the default animation Animation normal = new Animation("blood", "Normal", 1, 7, 6.0f); normal.Loop = 1; _Animations.AddAnimation(normal); _Animations.PlayAnimation("Normal"); _Geometry.Direction = Application.AppReference.Random.NextDouble() * Math.PI * 2; _Speed = (float)Application.AppReference.Random.NextDouble() * _SpeedVar + _BaseSpeed; _Geometry.Position = position; }
public override string Initialize() { // Create collision geometry for the marine float size = (float)Application.AppReference.Random.NextDouble() * SizeVariation + BaseSize; _Geometry = new Geometry(this, new Vector2(), size, size, 0.0f, size); // Create an animation set for the marine _Animations = new AnimationSet(); // Add the default animation Animation normal = new Animation("alien_blood", "Normal", 1, 4, 4.5f); normal.Loop = 1; _Animations.AddAnimation(normal); _Animations.PlayAnimation("Normal"); // Set crosshair to front of screen _Depth = 0.75f; //_DynamicLighting = true; _Geometry.Direction = Application.AppReference.Random.NextDouble() * Math.PI * 2; _Speed = (float)Application.AppReference.Random.NextDouble() * SpeedVariation + SpeedBase; // Return the name for this class return("AlienBlood"); }
public override string Initialize() { // Create collision geometry for the marine _Geometry = new Geometry(this, new Vector2(), 44.0f, 44.0f, 0.0f, 16.0f); // Create an animation set for the marine _Animations = new AnimationSet(); // Add the default animation _Animations.AddAnimation(new Animation("alien3", "Normal", 1, 5, 8.0f)); _Animations.PlayAnimation("Normal"); // Set crosshair to front of screen _Depth = 0.79f; _DynamicLighting = true; // Flag as an active collision entity CollisionType = CollisionType.Active; // Return the name for this class return("Alien"); }
public override string Initialize() { // Create collision geometry for the marine _Geometry = new Geometry(this, new Vector2(), 20.0f, 20.0f, 0.0f, 0.0f); // Create an animation set for the marine _Animations = new AnimationSet(); // Add the default animation Animation normal = new Animation("muzzle_flash", "Normal", 1, 5, 10.0f); normal.Loop = 1; _Animations.AddAnimation(normal); _Animations.PlayAnimation("Normal"); // Set crosshair to front of screen _Depth = 0.18f; _ColourOverlay = new Color(1.0f, 0.9f, 0.7f, 0.6f); // Return the name for this class return("MuzzleFlash"); }