Ejemplo n.º 1
0
    public void doCrime()
    {
        if (moneyCheck == 2 || moneyCheck == 3)
        {
            GC.crime                    = 0;
            GlobalCash.CashCount       += crimeWin;
            StatusAndStats.moneyGained += crimeWin;
            animText                    = "+" + crimeWin;
            animColor                   = new Color32(59, 192, 63, 255);
            fontSize                    = 47;
            ALM.cashAnimation(animText, animColor, fontSize);

            myColor = new Color32(59, 192, 63, 255);
            myText  = ">You sold a brick as an iPhone and earned " + crimeWin;
            ALM.LogText(myText, myColor);
            coinStack.Play();
        }

        else if (moneyCheck == 5)
        {
            GC.crime                    = 0;
            GlobalCash.CashCount       += crimeWinBig + Mathf.Ceil(GlobalCash.CashCount / 2);
            StatusAndStats.moneyGained += crimeWinBig;
            animText                    = "+" + crimeWinBig;
            animColor                   = new Color32(59, 192, 63, 255);
            fontSize                    = 47;
            ALM.cashAnimation(animText, animColor, fontSize);

            myText  = ">WOW! You robbed a bank and got away with " + crimeWinBig + "!";
            myColor = new Color32(14, 200, 1, 255);
            ALM.LogText(myText, myColor);
            coinStack.Play();
        }
        else
        {
            GC.crime                  = 0;
            moneyLoss                 = GlobalCash.CashCount * LossRange;
            GlobalCash.CashCount     -= (int)moneyLoss;
            StatusAndStats.moneyLost += (int)moneyLoss;
            lossCashText.GetComponent <Text>().text = "-" + (int)moneyLoss;
            lossCashText.GetComponent <Animation>().Play("lossCashAnim");
            myText  = ">You got busted selling fake eggs and was fined " + (int)moneyLoss;
            myColor = new Color32(209, 112, 100, 255);
            ALM.LogText(myText, myColor);
        }
    }
Ejemplo n.º 2
0
    public void buyChick()
    {
        if (GlobalCash.CashCount >= ChickenPrice)
        {
            chicBak.Play();
            GlobalChickens.ChickenCount   += chickenAmountToBuy;
            StatusAndStats.chickensBought += chickenAmountToBuy;
            GlobalCash.CashCount          -= ChickenPrice;
            animText  = "+" + chickenAmountToBuy + " Chicken(s)";
            animColor = new Color32(59, 192, 63, 255);
            fontSize  = 32;
            ALM.cashAnimation(animText, animColor, fontSize);

            myText  = ">You bought " + chickenAmountToBuy + " chicken(s)";
            myColor = new Color32(233, 233, 233, 255);
            ALM.LogText(myText, myColor);
        }

        else if ((GlobalCash.CashCount < ChickenPrice) && (GlobalCash.CashCount >= 50))
        {
            cashRemainder                = (Convert.ToInt32(Mathf.Floor(GlobalCash.CashCount)) % 50);
            chickensToAfford             = ((int)GlobalCash.CashCount - cashRemainder) / 50;
            GlobalCash.CashCount        -= chickensToAfford * 50;
            GlobalChickens.ChickenCount += chickensToAfford;

            animText  = "+" + chickensToAfford + " Chickens(s)";
            animColor = new Color32(59, 192, 63, 255);
            fontSize  = 32;
            ALM.cashAnimation(animText, animColor, fontSize);

            myText  = ">You bought " + chickensToAfford + " chicken(s)";
            myColor = new Color32(233, 233, 233, 255);
            ALM.LogText(myText, myColor);
        }
        else
        {
        }
    }
Ejemplo n.º 3
0
    public void PickCoin()
    {
        GlobalCash.CashCount       += coinPickRate;
        StatusAndStats.moneyGained += coinPickRate;

        myText  = ">You found some cash!";
        myColor = new Color32(233, 233, 233, 255);
        ALM.LogText(myText, myColor);
        pickCoinSound.Play();
        animText  = "+" + coinPickRate;
        animColor = new Color32(59, 192, 63, 255);
        fontSize  = 47;
        ALM.cashAnimation(animText, animColor, fontSize);
    }
Ejemplo n.º 4
0
 public void Bribe() //flytt til purchaselog
 {
     if (GlobalCash.CashCount >= bribePrice)
     {
         bribe = true;
         GlobalCash.CashCount       -= bribePrice;
         StatusAndStats.moneyGained += (int)betAmount;
         StatusAndStats.fightsWon++;
         lossCashText.GetComponent <Text>().text = "" + bribePrice;
         lossCashText.GetComponent <Animation>().Play("lossCashAnim");
         myText  = ">You bribed the judge for " + bribePrice;
         myColor = new Color32(233, 233, 233, 255);
         ALM.LogText(myText, myColor);
         bribeBtn.SetActive(false);
     }
 }
Ejemplo n.º 5
0
    public void StartAutoMoney()
    {
        if (GlobalCash.CashCount >= 1000)
        {
            GlobalCash.CashCount -= 1000;
            AutoMoney.SetActive(true);
            upgrade10Btn.SetActive(false);
            lossCashText.GetComponent <Text>().text = "-1000";
            lossCashText.GetComponent <Animation>().Play("lossCashAnim");

            animText  = "UPGRADE!";
            animColor = new Color32(59, 192, 63, 255);
            fontSize  = 47;
            ALM.cashAnimation(animText, animColor, fontSize);

            myColor = new Color32(59, 192, 63, 255);
            myText  = ">UPGRADE! YOUR CHICKENS NOW PRODUCE 0.1 COIN EACH!";
            ALM.LogText(myText, myColor);
            upgradeSound.Play();
        }
    }