Ejemplo n.º 1
0
    void Update()
    {
        gold.Update();
        mana.Update();
        mages.Update();
        date.Update();

        timer += Time.deltaTime;
        if (timer > UpdateTime)
        {
            gold.Gather();
            mana.Gather();
            timer = 0;
        }
    }
Ejemplo n.º 2
0
 private void UpdateMages(GameTime dt)
 {
     foreach (Mage Mages in mages)
     {
         Mages.Update(dt);
         if (Mages.BoundingRect.Intersects(player.BoundingRect) && Player.hasBoughtpowerup)
         {
             //KillMage(Mages);
         }
         else if (Mages.BoundingRect.Intersects(player.BoundingRect) && Player.hasBoughtpowerup == false)
         {
             Kill(Mages);
         }
     }
 }