Пример #1
0
 // Start is called before the first frame update
 public override void Interact()
 {
     //Price is dynamic correlatng to amount of iitems bought.
     if (PScript.Score >= Price)
     {
         PScript.DecreaseScore(Price);
         PScript.HealthInv++;
         BoughtCounter++;
         Price = (int)((Price / 2) + Price);
         PScript.HealthIText.text = PScript.HealthInv.ToString();
     }
 }
Пример #2
0
 //Interact when you press E. Decrease Score by dynamically set price that correlates to amount of item bought
 public override void Interact()
 {
     if (PScript.Score >= Price)
     {
         Debug.Log("Score Decrease 3000");
         PScript.DecreaseScore(Price);
         //Increase Attributes
         CScript.Strength           += 30;
         CScript.StrengthNumber.text = CScript.Strength.ToString();
         if (CScript.NewSpeed < 10)
         {
             CScript.NewSpeed += 2f;
         }
         if (CScript.RunSpeed < 17)
         {
             CScript.RunSpeed        += 2f;
             CScript.SpeedNumber.text = CScript.RunSpeed.ToString();
         }
         //Change Swords to reflect current sword.
         if (PScript.OnSword == PScript.BladeofLight)
         {
             PScript.BladeofLight.SetActive(false);
         }
         else if (PScript.OnSword == PScript.BladeofLightning)
         {
             PScript.BladeofLightning.SetActive(false);
             PScript.BladeofLightningBH.SetActive(false);
         }
         else if (PScript.OnSword == PScript.BladeofDarkness)
         {
             PScript.BladeofDarkness.SetActive(false);
             PScript.BladeofDarknessBH.SetActive(false);
         }
         else if (PScript.OnSword == PScript.BladeofTheSun)
         {
             PScript.BladeofTheSun.SetActive(false);
             PScript.BladeofTheSunBH.SetActive(false);
         }
         else if (PScript.OnSword == PScript.ALegendsBlade)
         {
             PScript.ALegendsBlade.SetActive(false);
             PScript.ALegendsBladeBH.SetActive(false);
         }
         PScript.OnSword         = PScript.BladeofLightning;
         PScript.OnSwordBackHand = PScript.BladeofLightning;
         PScript.BladeofLightning.SetActive(true);
         PScript.BladeofLightningBH.SetActive(true);
         PScript.LightningAud.Play();
         BoughtCounter++;
         Price = (int)((Price / 2) + Price);
     }
 }
Пример #3
0
 public override void Interact()
 {
     if (PScript.Score >= Price)
     {
         //BoughtCounter++;
         //Price = (int)((Price * 1.5) + Price);
         PScript.DecreaseScore(Price);
         PScript.ShieldsInv++;
         BoughtCounter++;
         Price = (int)((Price / 2) + Price);
         PScript.ShieldIText.text = PScript.ShieldsInv.ToString();
     }
 }
Пример #4
0
 public override void Interact()
 {
     if (PScript.Score >= Price)
     {
         Debug.Log("Score Decrease 50000");
         PScript.DecreaseScore(Price);
         CScript.Strength           += 612;
         CScript.StrengthNumber.text = CScript.Strength.ToString();
         if (CScript.NewSpeed < 10)
         {
             CScript.NewSpeed += 4f;
         }
         if (CScript.RunSpeed < 17)
         {
             CScript.RunSpeed        += 4f;
             CScript.SpeedNumber.text = CScript.RunSpeed.ToString();
         }
         if (PScript.OnSword == PScript.BladeofLight)
         {
             PScript.BladeofLight.SetActive(false);
         }
         else if (PScript.OnSword == PScript.BladeofLightning)
         {
             PScript.BladeofLightning.SetActive(false);
             PScript.BladeofLightningBH.SetActive(false);
         }
         else if (PScript.OnSword == PScript.BladeofDarkness)
         {
             PScript.BladeofDarkness.SetActive(false);
             PScript.BladeofDarknessBH.SetActive(false);
         }
         else if (PScript.OnSword == PScript.BladeofTheSun)
         {
             PScript.BladeofTheSun.SetActive(false);
             PScript.BladeofTheSunBH.SetActive(false);
         }
         else if (PScript.OnSword == PScript.ALegendsBlade)
         {
             PScript.ALegendsBlade.SetActive(false);
             PScript.ALegendsBladeBH.SetActive(false);
         }
         PScript.OnSword         = PScript.ALegendsBlade;
         PScript.OnSwordBackHand = PScript.ALegendsBlade;
         PScript.ALegendsBlade.SetActive(true);
         PScript.ALegendsBladeBH.SetActive(true);
         PScript.LegendQ = true;
         PScript.LegendAud.Play();
         BoughtCounter++;
         Price = (int)((Price / 2) + Price);
     }
 }