示例#1
0
        public static Tile CreateTileTriggerKillBox(Rectangle bounds, bool triggerOnce)
        {
            TileTrigger t = new TileTrigger(bounds, triggerOnce);

            t.SetType();
            t.Initialize();
            World.tiles.Add(t);

            return(t);
        }
示例#2
0
        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);
        }
示例#3
0
 public void DealtDamage(TileTrigger tileTrigger)
 {
     takeDamage(tileTrigger);
     guiHUD.UpdateHealthBar();
 }
示例#4
0
 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();
 }
示例#5
0
        public static Tile CreateTileTriggerKillBox(Rectangle bounds, bool triggerOnce)
        {
            TileTrigger t = new TileTrigger(bounds, triggerOnce);
            t.SetType();
            t.Initialize();
            World.tiles.Add(t);

            return t;
        }
示例#6
0
        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;
        }