public static Tile CreateTileTriggerKillBox(Rectangle bounds, bool triggerOnce) { TileTrigger t = new TileTrigger(bounds, triggerOnce); t.SetType(); t.Initialize(); World.tiles.Add(t); return(t); }
public static Tile CreateTileTriggerDialogue(Rectangle bounds, bool triggerOnce, string dialogueKey) { TileTrigger t = new TileTrigger(bounds, triggerOnce); t.SetType(dialogueKey); t.Initialize(); World.tiles.Add(t); return(t); }
public void DealtDamage(TileTrigger tileTrigger) { takeDamage(tileTrigger); guiHUD.UpdateHealthBar(); }
public void takeDamage(TileTrigger tileTrigger, Element damageType = Element.PHYSICAL) { if (health - calculateDefenseDamage(tileTrigger.damage, damageType) <= 0) { health = 0; dying = true; } else { health -= calculateDefenseDamage(tileTrigger.damage, damageType); } SetHit(); }
public static Tile CreateTileTriggerKillBox(Rectangle bounds, bool triggerOnce) { TileTrigger t = new TileTrigger(bounds, triggerOnce); t.SetType(); t.Initialize(); World.tiles.Add(t); return t; }
public static Tile CreateTileTriggerDialogue(Rectangle bounds, bool triggerOnce, string dialogueKey) { TileTrigger t = new TileTrigger(bounds, triggerOnce); t.SetType(dialogueKey); t.Initialize(); World.tiles.Add(t); return t; }