Esempio n. 1
0
    public void SetInfo(int organType, int OrganNumber)
    {
        //Debug.Log("organ Type = " + organType);
        GetReferences();
        myOrganType   = organType;
        myOrganNumber = OrganNumber;

        OrganImage.sprite       = organSprites[organType];
        OrganName.text          = OM.organTypes[organType].Name;
        OrganDisplayNumber.text = "#" + (OrganNumber + 1);

        int RedCells    = countCells(organType, OrganNumber, 0);
        int WhiteCells  = countCells(organType, OrganNumber, 1);
        int HelperCells = countCells(organType, OrganNumber, 2);

        RedCount.text    = RedCells.ToString();
        WhiteCount.text  = WhiteCells.ToString();
        HelperCount.text = HelperCells.ToString();

        double Energy = CalculateRedProduction(organType, RedCells);

        RedEnergy.text = AbbreviationUtility.AbbreviateNumber(Energy);
        float Percentage = calculateRedPercentage(Energy);

        RedPercentage.text = Percentage.ToString("F1") + "%";
    }
Esempio n. 2
0
 public void Update()
 {
     IncrementCoinsPerSecond();
     coinsText.text          = $"Coins: {AbbreviationUtility.AbbreviateNumber(coins)}";
     coinsPerTapText.text    = $"+{AbbreviationUtility.AbbreviateNumber(GetCoinsPerTap())} coins";
     coinsPerSecondText.text = $"+{AbbreviationUtility.AbbreviateNumber(GetCoinsPerSecond())} coins/sec";
 }
Esempio n. 3
0
 private void UpdateCosts()
 {
     if (organManager.activeOrganType < 12)
     {
         BuyOrganButton.CostText.text          = AbbreviationUtility.AbbreviateNumber(organManager.organTypes[organManager.activeOrganType].PointCost[organManager.organTypes[organManager.activeOrganType].organs.Count]);
         UpgradeMultiplierButton.CostText.text = AbbreviationUtility.AbbreviateNumber(organManager.organTypes[organManager.activeOrganType].pointMultiplierCost);
         PlatletBuyButton.CostText.text        = AbbreviationUtility.AbbreviateNumber(organManager.organTypes[organManager.activeOrganType].plateletCost);
     }
 }
Esempio n. 4
0
 private void UpdateNewOrganUI()
 {
     for (int i = 0; i < newOrganObjects.Length; i++)
     {
         if (organManager.organTypes[i].unlocked)
         {
             newOrganObjects[i].Object.SetActive(false);
         }
         else
         {
             newOrganObjects[i].ComplexityCost.text = organManager.organTypes[i].ComplexityCost[0].ToString();
             newOrganObjects[i].EnergyCost.text     = AbbreviationUtility.AbbreviateNumber(organManager.organTypes[i].PointCost[0]);
             newOrganObjects[i].Object.SetActive(true);
             if (gameManager.pointsManager.totalPoints < organManager.organTypes[i].PointCost[0])
             {
                 newOrganObjects[i].EnergyCostCG.alpha = 0.7f;
             }
             else
             {
                 newOrganObjects[i].EnergyCostCG.alpha = 1;
             }
             int ComplexityCost = gameManager.pointsManager.ComplexityPoints + Mathf.FloorToInt(organManager.organTypes[i].ComplexityCost[0]);
             newOrganObjects[i].Object.TryGetComponent(out CanvasGroup CG);
             if (CG != null)
             {
                 if (ComplexityCost > gameManager.pointsManager.ComplexityMaxPoints)
                 {
                     CG.alpha = 0.5f;
                 }
                 else
                 {
                     CG.alpha = 1f;
                 }
             }
         }
     }
 }
Esempio n. 5
0
 public void UpdateCellCost()
 {
     if (myOrganManager != null)
     {
         if (myOrganManager.organTypes[myOrganManager.activeOrganType].organs != null)
         {
             if (myOrganManager.organTypes[myOrganManager.activeOrganType].organs.Count != 0)
             {
                 if (CellCost != null)
                 {
                     CellCost.text = AbbreviationUtility.AbbreviateNumber(myOrganManager.organTypes[myOrganManager.activeOrganType].organs[myOrganManager.activeOrganID].CellTypes[CurrentCellType].currentCellCost);
                 }
                 else
                 {
                     Debug.Log("Cell Cost is null");
                 }
             }
         }
     }
     else
     {
         Debug.LogWarning("Organ Manager is null");
     }
 }
Esempio n. 6
0
 private void Update()
 {
     PointsText.text          = AbbreviationUtility.AbbreviateNumber(pointsManager.totalPoints);
     PointsPerSecondText.text = AbbreviationUtility.AbbreviateNumber(pointsManager.PointsPerSecond()) + " /s";
 }