void Session_TowerPurchased(object sender, TowerEventArgs ptea) { ptea.t.LeftClickEvent += new EventHandler(t_LeftClickEvent); }
void Session_TowerSold(object sender, TowerEventArgs ptea) { if (ptea.t == SelectedActiveTower) SelectedActiveTower = null; }
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(); }