Finished target enemy. They now die on being hit by a projectile. Also cleaned up a debug log.

This commit is contained in:
JoshuaNavarro 2019-07-22 17:15:23 -07:00
parent 1a629e5b47
commit c5e4b5ecdc
5 changed files with 18 additions and 9 deletions

View File

@ -37,9 +37,7 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame.SSCEnemies
public override void update(GameTime time) public override void update(GameTime time)
{ {
base.update(time); if(this.sprite.animation.IsAnimationPlaying==false && this.targetHit)
if(this.sprite.animation.currentAnimationName=="None" && this.targetHit)
{ {
this.shouldDie = true; this.shouldDie = true;
} }

View File

@ -472,8 +472,8 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame.SSCMenus
} }
SSCEnemies.SSCE_Target.Spawn_SSCE_Target(new Vector2(100, 100), Color.Blue); SSCEnemies.SSCE_Target.Spawn_SSCE_Target(new Vector2(100, 100), Color.Blue);
SSCEnemies.SSCE_Target.Spawn_SSCE_Target(new Vector2(200, 100), Color.Red); // SSCEnemies.SSCE_Target.Spawn_SSCE_Target(new Vector2(200, 100), Color.Red);
SSCEnemies.SSCE_Target.Spawn_SSCE_Target(new Vector2(300, 100), Color.Green); //SSCEnemies.SSCE_Target.Spawn_SSCE_Target(new Vector2(300, 100), Color.Green);
} }
/// <summary> /// <summary>

View File

@ -377,7 +377,6 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame
{ {
player.update(time); player.update(time);
} }
this.enemies.update(time);
} }
else else
{ {
@ -385,6 +384,7 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame
{ {
if (player.playerID == SSCEnums.PlayerID.One) this.camera.centerOnPosition(player.position); if (player.playerID == SSCEnums.PlayerID.One) this.camera.centerOnPosition(player.position);
player.update(time); player.update(time);
this.enemies.update(time);
} }
} }

View File

@ -24,6 +24,17 @@ namespace StardustCore.Animations
public bool IsNull => this.defaultDrawFrame == null && this.objectTexture == null; public bool IsNull => this.defaultDrawFrame == null && this.objectTexture == null;
/// <summary>
/// Checks to see if there is an animation playing.
/// </summary>
public bool IsAnimationPlaying
{
get
{
return !(this.defaultDrawFrame == this.currentAnimation);
}
}
/// <summary>Construct an instance.</summary> /// <summary>Construct an instance.</summary>
public AnimationManager() { } public AnimationManager() { }

View File

@ -211,7 +211,7 @@ namespace StardustCore.UIUtilities
{ {
Texture2DExtended textureExtended = new Texture2DExtended(ModCore.ModHelper, ModCore.Manifest, Path.Combine(relativePath, Path.GetFileName(file))); Texture2DExtended textureExtended = new Texture2DExtended(ModCore.ModHelper, ModCore.Manifest, Path.Combine(relativePath, Path.GetFileName(file)));
ModCore.log("Found texture: " + textureExtended.Name); //ModCore.log("Found texture: " + textureExtended.Name);
textureExtended.texture.Name = ModCore.Manifest.UniqueID + "_" + this.name + "_" + textureExtended.Name; textureExtended.texture.Name = ModCore.Manifest.UniqueID + "_" + this.name + "_" + textureExtended.Name;
@ -222,7 +222,7 @@ namespace StardustCore.UIUtilities
{ {
Texture2DExtended textureExtended = new Texture2DExtended(Helper, Manifest, Path.Combine(relativePath, Path.GetFileName(file))); Texture2DExtended textureExtended = new Texture2DExtended(Helper, Manifest, Path.Combine(relativePath, Path.GetFileName(file)));
ModCore.log("Found texture: " + textureExtended.Name); //ModCore.log("Found texture: " + textureExtended.Name);
textureExtended.texture.Name = Manifest.UniqueID + "_" + this.name + "_" + textureExtended.Name; textureExtended.texture.Name = Manifest.UniqueID + "_" + this.name + "_" + textureExtended.Name;
@ -234,7 +234,7 @@ namespace StardustCore.UIUtilities
Texture2DExtended textureExtended = new Texture2DExtended(ContentPack, Path.Combine(relativePath, Path.GetFileName(file))); Texture2DExtended textureExtended = new Texture2DExtended(ContentPack, Path.Combine(relativePath, Path.GetFileName(file)));
textureExtended.texture.Name = ContentPack.Manifest.UniqueID + "_" + this.name + "_" + textureExtended.Name; textureExtended.texture.Name = ContentPack.Manifest.UniqueID + "_" + this.name + "_" + textureExtended.Name;
ModCore.log("Found texture: " + textureExtended.Name); //ModCore.log("Found texture: " + textureExtended.Name);
//this.addTexture(textureExtended.Name, textureExtended); //this.addTexture(textureExtended.Name, textureExtended);
} }