示例#1
0
    void Start()
    {
        currentPlayerGameObj = player1;
        targetScript         = Target.GetComponent <Target>();
        Cursor.visible       = false;

        playerScript = currentPlayerGameObj.GetComponent <PScript>();
    }
示例#2
0
    private void Update()
    {
        LaserShot();
        PistolShot();

        managerScript = FindObjectOfType <GameManager>().GetComponent <GameManager>();

        currentPlayer = managerScript.currentPlayerGameObj;

        playerScript = currentPlayer.GetComponent <PScript>();
    }
示例#3
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();
     }
 }
 //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);
     }
 }
示例#5
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();
     }
 }
示例#6
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);
     }
 }
示例#7
0
    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;
    }
示例#8
0
 public object Get(string path)
 {
     return(PScript.Eval(context, path));
 }
示例#9
0
        static void Main(string[] args)
        {
            var f = new Foo();

            Console.WriteLine(PScript.Eval(f, "b[\"asdf\"]"));
        }
示例#10
0
    private void Update()
    {
        currentPlayer = managerScript.currentPlayerGameObj;

        playerScript = currentPlayer.GetComponent <PScript>();
    }