Exemplo n.º 1
0
 void Session_TowerPurchased(object sender, TowerEventArgs ptea)
 {
     ptea.t.LeftClickEvent += new EventHandler(t_LeftClickEvent);
 }
Exemplo n.º 2
0
 void Session_TowerSold(object sender, TowerEventArgs ptea)
 {
     if (ptea.t == SelectedActiveTower) SelectedActiveTower = null;
 }
Exemplo n.º 3
0
        void Session_TowerPurchased(object sender, TowerEventArgs ptea)
        {
            ptea.t.LeftClickEvent += new EventHandler(clickableTower_LeftClickEvent);
            Button b = SelectedTower.GetButton("BuyTower");
            if (clickedTower.Cost > Session.ActivePlayer.Money)
            {
                b.Texture = Session.Map.SmallErrorButtonTexture;
                b.SetColor(Session.Map.ErrorColor);

                if (b.State == UIButtonState.Active)
                {
                    b.LeftClickEvent -= buyTower_LeftClick;
                    b.Deactivate();
                }
            }
            //Aquii vaaaa  el cancel
            ResetTowerReferences();
            Session.UI.MapRegion.ResetTowerReferences();
        }