public static Telescope Factory(string hero) { Telescope telescope = Telescope.Factory(); GameManager.instance.findHero(hero).heroInventory.AddItem(telescope); return(telescope); }
public static void Buy() { Hero hero = GameManager.instance.MainHero; int cost = 2; if (hero.timeline.Index != 0) { if (hero.heroInventory.numOfGold >= cost) { Telescope toAdd = Telescope.Factory(); if (hero.heroInventory.AddSmallToken(toAdd)) { hero.heroInventory.RemoveGold(cost); } else { return; } } else { EventManager.TriggerError(0); return; } } else { EventManager.TriggerError(2); return; } }
public static Telescope Factory(int cellID) { Telescope telescope = Telescope.Factory(); telescope.Cell = Cell.FromId(cellID); return(telescope); }