コード例 #1
0
    // Use this for initialization
    void Start()
    {
        // Wylacz sklep na starcie
        StorePanel.gameObject.SetActive(false);
        ShopExit.gameObject.SetActive(false);

        // Wyswietlanie ceny multiplierow
        M1PriceText.text = "Price: " + M1Price.ToString();
        M2PriceText.text = "Price: " + M2Price.ToString();
        M3PriceText.text = "Price: " + M3Price.ToString();
        M4PriceText.text = "Price: " + M4Price.ToString();
        M5PriceText.text = "Price: " + M5Price.ToString();
        M6PriceText.text = "Price: " + M6Price.ToString();


        A1PriceText.text  = "Price: " + A1Price.ToString();
        A1AmountText.text = "Amount: " + A1Amount.ToString();
        A2PriceText.text  = "Price: " + A2Price.ToString();
        A2AmountText.text = "Amount: " + A2Amount.ToString();
        A3PriceText.text  = "Price: " + A3Price.ToString();
        A3AmountText.text = "Amount: " + A3Amount.ToString();
        A4PriceText.text  = "Price: " + A4Price.ToString();
        A4AmountText.text = "Amount: " + A4Amount.ToString();
        A5PriceText.text  = "Price: " + A5Price.ToString();
        A5AmountText.text = "Amount: " + A5Amount.ToString();
        A6PriceText.text  = "Price: " + A6Price.ToString();
        A6AmountText.text = "Amount: " + A6Amount.ToString();

        A1Stats.text = " " + A1Amount.ToString();
        A2Stats.text = " " + A2Amount.ToString();
        A3Stats.text = " " + A3Amount.ToString();
        A4Stats.text = " " + A4Amount.ToString();
        A5Stats.text = " " + A5Amount.ToString();
        A6Stats.text = " " + A6Amount.ToString();
    }
コード例 #2
0
    public void BuyA3()
    {
        Points -= A3Price;

        A3Active = true;

        A3Amount = A3Amount + 1;

        A3Price = A3Price + A3PriceIncrease;

        A3PriceText.text  = "Price: " + A3Price.ToString();
        A3AmountText.text = "Amount: " + A3Amount.ToString();
        A3Stats.text      = " " + A3Amount.ToString();
    }
コード例 #3
0
    public void ShopReset()
    {
        M1Active = false;
        M2Active = false;
        M3Active = false;
        M4Active = false;
        M5Active = false;
        M6Active = false;

        A1Active = false;
        A2Active = false;
        A3Active = false;
        A4Active = false;
        A5Active = false;
        A6Active = false;

        A1Amount = 0;
        A2Amount = 0;
        A3Amount = 0;
        A4Amount = 0;
        A5Amount = 0;
        A6Amount = 0;

        A1Price = 128;
        A2Price = 192;
        A3Price = 288;
        A4Price = 432;
        A5Price = 648;
        A6Price = 972;

        M1SoldText.gameObject.SetActive(false);
        M1PriceText.gameObject.SetActive(true);
        M2SoldText.gameObject.SetActive(false);
        M2PriceText.gameObject.SetActive(true);
        M3SoldText.gameObject.SetActive(false);
        M3PriceText.gameObject.SetActive(true);
        M4SoldText.gameObject.SetActive(false);
        M4PriceText.gameObject.SetActive(true);
        M5SoldText.gameObject.SetActive(false);
        M5PriceText.gameObject.SetActive(true);
        M6SoldText.gameObject.SetActive(false);
        M6PriceText.gameObject.SetActive(true);

        A1PriceText.text  = "Price: " + A1Price.ToString();
        A1AmountText.text = "Amount: " + A1Amount.ToString();
        A2PriceText.text  = "Price: " + A2Price.ToString();
        A2AmountText.text = "Amount: " + A2Amount.ToString();
        A3PriceText.text  = "Price: " + A3Price.ToString();
        A3AmountText.text = "Amount: " + A3Amount.ToString();
        A4PriceText.text  = "Price: " + A4Price.ToString();
        A4AmountText.text = "Amount: " + A4Amount.ToString();
        A5PriceText.text  = "Price: " + A5Price.ToString();
        A5AmountText.text = "Amount: " + A5Amount.ToString();
        A6PriceText.text  = "Price: " + A6Price.ToString();
        A6AmountText.text = "Amount: " + A6Amount.ToString();

        A1Stats.text = " " + A1Amount.ToString();
        A2Stats.text = " " + A2Amount.ToString();
        A3Stats.text = " " + A3Amount.ToString();
        A4Stats.text = " " + A4Amount.ToString();
        A5Stats.text = " " + A5Amount.ToString();
        A6Stats.text = " " + A6Amount.ToString();
    }
コード例 #4
0
// System wczytywania postaci
    public void LoadPlayer()
    {
        if (SaveSystem.LoadPlayer() != null)
        {
            PlayerData data = SaveSystem.LoadPlayer();

            Points              = data.Points;
            PointsMultiplier    = data.PointsMultiplier;
            TotalNumberOfClicks = data.TotalNumberOfClicks;

            M1Active = data.M1Active;
            M2Active = data.M2Active;
            M3Active = data.M3Active;
            M4Active = data.M4Active;
            M5Active = data.M5Active;
            M6Active = data.M6Active;

            A1Active = data.A1Active;
            A1Amount = data.A1Amount;
            A1Price  = data.A1Price;

            A2Active = data.A2Active;
            A2Amount = data.A2Amount;
            A2Price  = data.A2Price;

            A3Active = data.A3Active;
            A3Amount = data.A3Amount;
            A3Price  = data.A3Price;

            A4Active = data.A4Active;
            A4Amount = data.A4Amount;
            A4Price  = data.A4Price;

            A5Active = data.A5Active;
            A5Amount = data.A5Amount;
            A5Price  = data.A5Price;

            A6Active = data.A6Active;
            A6Amount = data.A6Amount;
            A6Price  = data.A6Price;

            if (M1Active == true)
            {
                M1.interactable = false;
                M1SoldText.gameObject.SetActive(true);
                M1PriceText.gameObject.SetActive(false);
                if (M2Active == true)
                {
                    M2.interactable = false;
                    M2SoldText.gameObject.SetActive(true);
                    M2PriceText.gameObject.SetActive(false);
                    if (M3Active == true)
                    {
                        M3.interactable = false;
                        M3SoldText.gameObject.SetActive(true);
                        M3PriceText.gameObject.SetActive(false);
                        if (M4Active == true)
                        {
                            M4.interactable = false;
                            M4SoldText.gameObject.SetActive(true);
                            M4PriceText.gameObject.SetActive(false);
                            if (M5Active == true)
                            {
                                M5.interactable = false;
                                M5SoldText.gameObject.SetActive(true);
                                M5PriceText.gameObject.SetActive(false);
                                if (M6Active == true)
                                {
                                    M6.interactable = false;
                                    M6SoldText.gameObject.SetActive(true);
                                    M6PriceText.gameObject.SetActive(false);
                                }
                            }
                        }
                    }
                }
            }

            A1PriceText.text  = "Price: " + A1Price.ToString();
            A1AmountText.text = "Amount: " + A1Amount.ToString();
            A2PriceText.text  = "Price: " + A2Price.ToString();
            A2AmountText.text = "Amount: " + A2Amount.ToString();
            A3PriceText.text  = "Price: " + A3Price.ToString();
            A3AmountText.text = "Amount: " + A3Amount.ToString();
            A4PriceText.text  = "Price: " + A4Price.ToString();
            A4AmountText.text = "Amount: " + A4Amount.ToString();
            A5PriceText.text  = "Price: " + A5Price.ToString();
            A5AmountText.text = "Amount: " + A5Amount.ToString();
            A6PriceText.text  = "Price: " + A6Price.ToString();
            A6AmountText.text = "Amount: " + A6Amount.ToString();

            A1Stats.text = " " + A1Amount.ToString();
            A2Stats.text = " " + A2Amount.ToString();
            A3Stats.text = " " + A3Amount.ToString();
            A4Stats.text = " " + A4Amount.ToString();
            A5Stats.text = " " + A5Amount.ToString();
            A6Stats.text = " " + A6Amount.ToString();

            MENU.gameObject.SetActive(false);
        }
        else
        {
            MENU.gameObject.SetActive(false);
        }
    }