// Use this for initialization void Start() { //createCells(); rotation = Quaternion.Euler(-90, 0, 0); roundCells0 = Mathf.RoundToInt(.83f * cellStartAmount); //83% cell, 5% schmooed, 12% budded schmooedCells0 = Mathf.RoundToInt(.05f * cellStartAmount); buddedCells0 = Mathf.RoundToInt(.12f * cellStartAmount); roundCells90 = Mathf.RoundToInt(.49f * cellStartAmount); //49% cell, 37% schmooed, 14% budded schmooedCells90 = Mathf.RoundToInt(.37f * cellStartAmount); buddedCells90 = Mathf.RoundToInt(.14f * cellStartAmount); roundCells180 = Mathf.RoundToInt(.20f * cellStartAmount); //20% cell, 64% schmooed, 16% budded schmooedCells180 = Mathf.RoundToInt(.64f * cellStartAmount); buddedCells180 = Mathf.RoundToInt(.16f * cellStartAmount); roundCells270 = Mathf.RoundToInt(.13f * cellStartAmount); //13% cell, 85% schmooed, 2% budded schmooedCells270 = Mathf.RoundToInt(.85f * cellStartAmount); buddedCells270 = Mathf.RoundToInt(.02f * cellStartAmount); roundCells360 = Mathf.RoundToInt(.14f * cellStartAmount); //14% cell, 83% schmooed, 3% budded schmooedCells360 = Mathf.RoundToInt(.83f * cellStartAmount); buddedCells360 = Mathf.RoundToInt(.03f * cellStartAmount); sliderScript = other.gameObject.GetComponent <OtherSlider>(); time = sliderScript.getTime(); tempTime = time; }
// Use this for initialization void Start() { //createCells(); rotation = Quaternion.Euler(-90, 0, 0); roundCells0 = Mathf.RoundToInt(.92f * cellStartAmount); //92% cell, 0% schmooed, 8% budded schmooedCells0 = Mathf.RoundToInt(0f * cellStartAmount); buddedCells0 = Mathf.RoundToInt(.08f * cellStartAmount); roundCells90 = Mathf.RoundToInt(.69f * cellStartAmount); //69% cell, 0% schmooed, 32% budded schmooedCells90 = Mathf.RoundToInt(0f * cellStartAmount); buddedCells90 = Mathf.RoundToInt(.32f * cellStartAmount); roundCells180 = Mathf.RoundToInt(.68f * cellStartAmount); //68% cell, 0% schmooed, 32% budded schmooedCells180 = Mathf.RoundToInt(0f * cellStartAmount); buddedCells180 = Mathf.RoundToInt(.32f * cellStartAmount); roundCells270 = Mathf.RoundToInt(.55f * cellStartAmount); //55% cell, 0% schmooed, 45% budded schmooedCells270 = Mathf.RoundToInt(0f * cellStartAmount); buddedCells270 = Mathf.RoundToInt(.45f * cellStartAmount); roundCells360 = Mathf.RoundToInt(.16f * cellStartAmount); //16% cell, 0% schmooed, 84% budded schmooedCells360 = Mathf.RoundToInt(0f * cellStartAmount); buddedCells360 = Mathf.RoundToInt(.84f * cellStartAmount); sliderScript = other.gameObject.GetComponent <OtherSlider>(); time = sliderScript.getTime(); tempTime = time; }
// Update is called once per frame void Update() { sliderScript = other.gameObject.GetComponent <OtherSlider>(); time = sliderScript.getTime(); setTime(); }