Exemplo n.º 1
0
    public static Telescope Factory(string hero)
    {
        Telescope telescope = Telescope.Factory();

        GameManager.instance.findHero(hero).heroInventory.AddItem(telescope);
        return(telescope);
    }
Exemplo n.º 2
0
    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;
        }
    }
Exemplo n.º 3
0
    public static Telescope Factory(int cellID)
    {
        Telescope telescope = Telescope.Factory();

        telescope.Cell = Cell.FromId(cellID);
        return(telescope);
    }