// Rendering/Transform initialization void Start() { beerPongManager = microgame.GetComponent <BeerPongManager> (); rb = GetComponent <Rigidbody2D> (); minPosY = transform.position.y; }
// Update is called once per frame void Update () { if (Input.GetKeyDown (more)) { num++; text.text = num.ToString (); } if (Input.GetKeyDown (less)) { num -= 1; text.text = num.ToString (); } if (Input.GetKeyDown (confirm)) { float numGirls = controller.GetComponent<Girls> ().num; if (numGirls == num) controller.EndMicrogame (true); else controller.EndMicrogame (false); } }