// Use this for initialization void Start() { myRenderer = GetComponent <Renderer> (); gameInstance = GetComponentInParent <BreakerBehaviour> (); bat = GameObject.FindGameObjectsWithTag("Bat")[0].GetComponent <BatBehaviour>(); lastUpdate = Time.fixedTime; Reset(); }
void OnTriggerEnter(Collider col) { BallBehaviour ball = col.gameObject.GetComponent <BallBehaviour> (); BreakerBehaviour game = GetComponentInParent <BreakerBehaviour> (); if (ball != null && game != null) { game.isWarping = isWarpEntry; } }
// Use this for initialization void Start() { ResetScale(); joyStick = GameObject.FindGameObjectWithTag("Joystick").GetComponent <FloatingJoystick>(); joyStick.gameObject.GetComponent <RectTransform>().SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, Screen.width); joyStick.gameObject.GetComponent <RectTransform>().SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, Screen.height); gameInstance = GameObject.Find("playground").GetComponent <BreakerBehaviour>(); otherBat = GameObject.Instantiate(otherBat); otherBat.transform.SetParent(transform); otherBat.transform.localPosition = new Vector3(0, this.minimalBatGap, 0); }
// Use this for initialization void Start() { gameInstance = GetComponentInParent <BreakerBehaviour> (); }