things/EnemySpikeSpecial.cs
using System;
using System.Collections.Generic;
using SpriteTools;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Manager;
public class EnemySpikeSpecial : EnemySpike
{
private bool _hasCreatedPuddle;
protected override void OnAwake()
{
base.OnAwake();
//OffsetY = -0.2f;
Radius = 0.3f;
Scale = 1.3f;
Sprite.LocalScale = new Vector3( 1f ) * Scale * Globals.SPRITE_SCALE;
Lifetime = 1.9f;
Damage = 15f;
BgSprite.LocalScale = new Vector3( 1f ) * 1.4f * Globals.SPRITE_SCALE;
var warning = Manager.Instance.SpawnWarning( Position2D, Color.Yellow, Color.Blue );
warning.Lifetime = 0.6f;
}
protected override void OnUpdate()
{
base.OnUpdate();
if ( !_hasCreatedPuddle && SpawnTime > 1.05f )
{
Manager.Instance.SpawnLavaPuddle( Position2D, lifetime: Game.Random.Float(7f, 10f), new Color( 0.07f, 0.07f, 1f ), new Color( 0f, 0f, 1f ), damage: 1f + Math.Min( Manager.Instance.Difficulty, 5 ) * 0.3f, radius: Game.Random.Float( 2.9f, 3.2f ) );
_hasCreatedPuddle = true;
}
}
}