// Use this for initialization void Start() { GV = GameObject.FindGameObjectWithTag("GameController").GetComponent <GlobalVariables>(); score = GV.GetComponent <ScoreCounter>(); cubegen = GameObject.FindGameObjectWithTag("CenterCube").GetComponent <BCubeGenerate>(); cmr = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CameraControls>(); Ccube = cubegen.Ccube; }
// Use this for initialization void Start() { GV = GameObject.FindGameObjectWithTag("GameController").GetComponent <GlobalVariables>(); Cubegen = GameObject.FindGameObjectWithTag("CenterCube").GetComponent <BCubeGenerate>(); CubeHealth = GV.CubeHealth; obj = this.gameObject; score = GameObject.FindGameObjectWithTag("GameController").GetComponent <ScoreCounter>(); particle = this.GetComponentInChildren <ParticleSystem>(); particlerender = this.GetComponentInChildren <ParticleSystemRenderer>(); ApplyColor(GV.BreakableCubeColors); }