// Update is called once per void Update() { ito_flag2 = PauseScript.GetItoFlag(); if (Input.GetMouseButtonDown(0) && ito_flag2 == 1) { swing = true; if (rb_player.velocity.y < 0) { Debug.Log("good"); } if (rb_player.velocity.y > 0) { Debug.Log("bad"); } } if (Input.GetMouseButtonUp(0) && ito_flag2 == 1) { jump = true; if (Random.Range(0, 100) < p) { wool = Instantiate(woolPrefab) as GameObject; wool.transform.position = new Vector3(transform.position.x + 65f, Random.Range(5.0f, 10.0f), 0f); } } }
// Update is called once per void Update() { ito_flag2 = PauseScript.GetItoFlag(); if (Input.GetMouseButtonDown(0) && ito_flag2 == 1) { swing = true; } if (Input.GetMouseButtonUp(0) && ito_flag2 == 1) { jump = true; if (Random.Range(0, 100) < p) { wool = Instantiate(woolPrefab) as GameObject; wool.transform.position = new Vector3(transform.position.x + 30f, Random.Range(5.0f, 10.0f), 0f); } } }