Ejemplo n.º 1
0
    private void Update()
    {
        ProgressionBar.value = Progress;

        //Adding Points
        if (CheeseEquipped.activeInHierarchy == true)
        {
            if (GameManager.Instance.Paused == false)
            {
                Progress++;
            }
        }

        //Win Condition (Remember to change the slider value)
        if (Progress >= PointsToWin)
        {
            GameManager.Instance.PlayerWin();
        }

        //Testing Button
        if (Input.GetButtonDown("Unequip"))
        {
            CheeseEquipped.SetActive(false);
            //Instantiate(Cheese, transform.position, Quaternion.identity);
        }
    }
Ejemplo n.º 2
0
 public void CheeseLose(Vector3 hitPosition)
 {
     if (CheeseEquipped.activeSelf)
     {
         CheeseEquipped.SetActive(false);
         cheese = Instantiate(cheesePrefab, hitPosition, Quaternion.identity);
         Debug.Log("acrive");
     }
 }
Ejemplo n.º 3
0
 //Player Equipping Cheese
 public void EquippedPlayer()
 {
     Cheese.SetActive(false);
     CheeseEquipped.SetActive(true);
 }