Beispiel #1
0
    public virtual void Mortgage()
    {
        if (CanMortagage())
        {
            _mortgaged = true;
            Owner.AddFunds(_morgVal);

            GameManager.UpdatePayButtonInteractibility();
            GameManager.UpdateBuyButtonInteractibility();
            MenuManager.UpdateInventoryData(Owner);
        }
    }
    public override void Use()
    {
        if (_type == EnumsForCards.cardCollect.fromBank)
        {
            Owner.AddFunds(_amount);
        }
        else //collect 50 from each player
        {
            currentPayee = GameManager.Players[(Array.IndexOf(GameManager.Players, GameManager.CurrentPlayer) + 1) % GameManager.Players.Length];
            GameManager.PlayerMustPay(50, currentPayee);

            //camera moves to show who is paying
            CameraFollow.target = currentPayee.transform;
        }
        base.Use();
    }
Beispiel #3
0
    public void SellHouse()
    {
        GameObject houseToRemove = houseObjects[houseObjects.Count - 1];

        houseObjects.Remove(houseToRemove);
        Destroy(houseToRemove);

        //set houses to be visible incase only hotel was visible
        foreach (GameObject obj in houseObjects)
        {
            obj.SetActive(true);
        }

        Owner.AddFunds(SellHousePrice);

        GameManager.UpdatePayButtonInteractibility();
        GameManager.UpdateBuyButtonInteractibility();
        MenuManager.UpdateInventoryData(Owner);
    }