private void OnBallLaunched(BowlingBall ball) { if (this._ballSlider) { this._ballSlider.gameObject.SetActive(false); } }
// Use this for initialization void Start() { _ball = gameObject.GetComponent <BowlingBall>(); var rigidBody = gameObject.GetComponent <Rigidbody>(); _initialBallX = rigidBody.position.x; }
public void OnBallGuttered(BowlingBall ball) { if (this._ballEntered) { return; } this.NewFrame(); }
void Start() { pinsController = FindObjectOfType <PinsController>(); ball = FindObjectOfType <BowlingBall>(); mCameraControl = FindObjectOfType <CameraControl>(); scoreManager = FindObjectOfType <ScoreManager>(); Frame.ResetFrames(); }
private void Start() { ball = FindObjectOfType <BowlingBall>(); pinPositions = GetComponentsInChildren <PinPosition>(); pins = new List <Pin>(); anim = GetComponent <Animator>(); SpawnPins(); LowerPins(); }
// Use this for initialization void Start() { pinSetter = GameObject.FindObjectOfType <PinSetter>(); actionMaster = GameObject.FindObjectOfType <ActionMasterOld>(); ball = GameObject.FindObjectOfType <BowlingBall>(); pinManager = GameObject.FindObjectOfType <PinManager>(); scoreDisplay = GameObject.FindObjectOfType <ScoreDisplay>(); pinList = new List <int>(); scoreDisplay.UpdateCumulativeScoreTexts(pinList); scoreDisplay.UpdateRollsTexts(pinList); }
// Use this for initialization void Start() { if (GameObject.FindObjectOfType <BowlingBall> ()) { ball = GameObject.FindObjectOfType <BowlingBall> (); } else { Debug.LogWarning("BowlingBall missing."); } //if (GameObject.FindObjectOfType<PinSetter> ()) { // pinSetter = GameObject.FindObjectOfType<PinSetter> (); //} else {Debug.LogWarning ("PinSetter missing.");} distanceToCamera = (transform.position.z - Camera.main.transform.position.z); startTime = -1; }
private void OnTriggerEnter(Collider collider) { var pin = collider.gameObject.GetComponent <BowlingPin>(); if (pin) { this._pins.Add(pin); return; } var ball = collider.gameObject.GetComponent <BowlingBall>(); if (ball) { this._ballEntered = ball; this.InvokeRepeating(nameof(this.FrameSettling), 5, 1); } }
void OnTriggerExit(Collider coll) { GameObject other = coll.gameObject; Pin pin = other.GetComponentInParent <Pin>(); if (pin) //lazy { Destroy(pin.gameObject, 0.1f); } else { BowlingBall ball = other.GetComponent <BowlingBall>(); if (ball) { ball.StartRecovery(); } } }
// Use this for initialization void Start() { bowlingBall = GameObject.FindObjectOfType <BowlingBall>(); animator = GameObject.FindObjectOfType <PinMaster2000>().GetComponent <Animator>(); //foreach (Pin pin in GameObject.FindObjectsOfType<Pin>()) //{ // pinSpawnLocation = transform.position; // pinSpawnRotation = transform.eulerAngles; //} Pin[] pinsStart = FindObjectsOfType <Pin>(); foreach (Pin pinAtStart in pinsStart) { pinSpawnLocation = pinAtStart.transform.position; pinSpawnRotation = pinAtStart.transform.eulerAngles; } }
// Use this for initialization void Start() { _ball = gameObject.GetComponent <BowlingBall>(); }
// Use this for initialization void Start() { bowlingball = GameObject.FindObjectOfType <BowlingBall>(); offset = gameObject.transform.position - bowlingball.transform.position; }
private void Start() { gameManager = FindObjectOfType <GameManager>(); ball = FindObjectOfType <BowlingBall>(); lastSettledCount = 10; }
// Use this for initialization void Start() { if (GameObject.Find("PinCount")) { pinCount = GameObject.Find("PinCount").GetComponent <Text> (); } else { Debug.LogWarning("Missing PinCount text object."); } if (GameObject.FindObjectOfType <BowlingBall> ()) { ball = GameObject.FindObjectOfType <BowlingBall> (); } else { Debug.LogWarning("Missing BowlingBall."); } if (GameObject.FindObjectOfType <PinSetter> ()) { pinSetter = GameObject.FindObjectOfType <PinSetter> (); } else { Debug.LogWarning("Missing PinSetter."); } if (GameObject.FindObjectOfType <PinCounter> ()) { pinCounter = GameObject.FindObjectOfType <PinCounter> (); } else { Debug.LogWarning("Missing pinCounter."); } if (GameObject.FindObjectOfType <ScoreDisplay> ()) { scoreDisplay = GameObject.FindObjectOfType <ScoreDisplay> (); } else { Debug.LogWarning("Missing ScoreDisplay."); } if (GameObject.Find("HowToPlay")) { howToPlay = GameObject.Find("HowToPlay"); } else { Debug.LogWarning("Missing HowToPlay."); } if (GameObject.Find("GameOver")) { gameOver = GameObject.Find("GameOver"); gameOver.SetActive(false); } else { Debug.LogWarning("Missing GameOver."); } // if (GameObject.Find("CheatButton")) { // cheatButton = GameObject.Find ("CheatButton"); // }else {Debug.LogWarning ("Missing CheatButton.");} PinCountUpdate(Color.black, -1); //pinCount.text = pinCounter.CountStanding ().ToString(); }
//here // Use this for initialization void Start() { pinSetter = GameObject.FindObjectOfType <PinSetter>(); ball = GameObject.FindObjectOfType <BowlingBall>(); scoreDisplay = GameObject.FindObjectOfType <ScoreDisplay>(); }
// Use this for initialization void Start() { pinSetter = GameObject.FindObjectOfType <PinSetter>(); bowlingBall = GameObject.FindObjectOfType <BowlingBall>(); }
private void Start() { ball = FindObjectOfType <BowlingBall>(); pinSetter = FindObjectOfType <PinSetter>(); scores = FindObjectOfType <ScoreDisplay>(); }
private void Start() { ball = FindObjectOfType <BowlingBall>(); }
void Start() { ball = GetComponent <BowlingBall>(); leftArrow = GameObject.Find("Left Arrow"); rightArrow = GameObject.Find("Right Arrow"); }
private void Start() { bowlingBall = GetComponent <BowlingBall>(); }
private void NewFrame() { this._ballEntered = null; Instantiate(this.BowlingBall); OnNewFrame.Invoke(); }
void Start() { ball = GetComponent <BowlingBall>(); }
// Use this for initialization void Start() { ball = GameObject.FindObjectOfType <BowlingBall>(); gameManager = GameObject.FindObjectOfType <GameManager>(); }