// Update is called once per frame void Update() { if (usethehack == true) { PlayerPrefs.SetInt("Den", playprefs); } if (PlayerPrefs.GetInt("Den") >= 1) { if (script02.enabled == true) { script02.PAY(); } } if (PlayerPrefs.GetInt("Den") >= 2) { if (Script01.enabled == true) { Script01.PAY(); } } }
// Update is called once per frame void Update() { if (PlayerPrefs.GetInt("Cub") >= 1) { if (Script01.enabled == true) { Script01.PAY(); } } if (!Player) { Player = GameObject.Find("Player"); } if (!Carry) { Carry = GameObject.Find("CubHoldingPosition"); } if (Level == 2) { Instantiate(Cub, new Vector3(transform.position.x, transform.position.y, 0), Quaternion.identity); Destroy(this.gameObject); } if (CurFood >= AmountOfFoodNeededToAgeUp) { CurFood = 0; Level++; } if (!Player) { Player = GameObject.Find("Player"); } if (Input.GetKeyDown(KeyCode.R) && dist < PickUpDistance && carrying == false) { carrying = true; } else if (Input.GetKeyDown(KeyCode.R) && carrying == true) { carrying = false; } if (carrying) { CarryMode(); } else { dist = Vector3.Distance(Player.transform.position, transform.position); } if (canPutInHive && carrying == false) { HiveMode(); if (rb.useGravity == true) { rb.useGravity = false; } } else if (rb.useGravity == false) { rb.useGravity = true; } }