void Start() { currentPlayerGameObj = player1; targetScript = Target.GetComponent <Target>(); Cursor.visible = false; playerScript = currentPlayerGameObj.GetComponent <PScript>(); }
private void Update() { LaserShot(); PistolShot(); managerScript = FindObjectOfType <GameManager>().GetComponent <GameManager>(); currentPlayer = managerScript.currentPlayerGameObj; playerScript = currentPlayer.GetComponent <PScript>(); }
// 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(); } }
//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); } }
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(); } }
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); } }
private void Start() { currentPlayer = gameManager.currentPlayerGameObj; playerScript = currentPlayer.GetComponent <PScript>(); // shootingManager = player1.GetComponent<ShootingManager>(); gameManager = FindObjectOfType <GameManager>().GetComponent <GameManager>(); //sequence[] = {false, false, false}; //CDBarGameObjects = new GameObject[4]; for (int i = 0; i < CDBarGameObjects.Length - 1; i++) { CDBarGameObjects[i].SetActive(false); } numAddLaserCD = playerScript.laserOverLoadCD; }
public object Get(string path) { return(PScript.Eval(context, path)); }
static void Main(string[] args) { var f = new Foo(); Console.WriteLine(PScript.Eval(f, "b[\"asdf\"]")); }
private void Update() { currentPlayer = managerScript.currentPlayerGameObj; playerScript = currentPlayer.GetComponent <PScript>(); }