// Use this for initialization void Start() { Is_Spawning = true; Cube_Counter = GameObject.Find("Active_Cube_Counter"); Active_Counter = Cube_Counter.GetComponent <CubeCounter> (); InvokeRepeating("Spawn_Cube", spawnTime, spawnRepeat); }
// Use this for initialization void Start() { ObjTransform = GetComponent <Transform> (); IsMoving = true; Cube_Contacts = new GameObject[4]; MeshTagUpdate = false; Mesh_R = GetComponent <MeshRenderer> (); Mat_ID = Random.Range(0, Obj_Color.Length); Mesh_R.material = Obj_Color [Mat_ID]; this.gameObject.tag = Colors [Mat_ID]; Active_Cube_Counter = GameObject.Find("Active_Cube_Counter"); A_C_C = Active_Cube_Counter.GetComponent <CubeCounter> (); InvokeRepeating("GreyRandoms", 0, Grey_R_Rate); }
// Use this for initialization void Start() { ObjTransform = GetComponent <Transform> (); IsMoving = true; Box_List = new GameObject[4]; UpdateRenderTag = false; Sprite_R = GetComponent <SpriteRenderer> (); Box_ID = Random.Range(0, Box_Sprites.Length); Sprite_R.sprite = Box_Sprites [Box_ID]; this.gameObject.tag = Box_Tags [Box_ID]; Active_Cube_Counter = GameObject.Find("Active_Cube_Counter"); A_C_C = Active_Cube_Counter.GetComponent <CubeCounter> (); InvokeRepeating("GreyRandom", 0, Grey_2D_R_Rate); Explosion = Instantiate(ParticleSystem, this.gameObject.transform.position, this.gameObject.transform.rotation); E_C = Explosion.GetComponent <ExposionControl> (); E_C.isAwake = false; Explosion.SetActive(false); }
void Start() { Text levelText = GameObject.Find("Level text").GetComponent <Text>(); CubeCounter cs = GameObject.Find("Kart").GetComponent <CubeCounter>(); TimeOnScreen ts = GameObject.Find("TimeObject").GetComponent <TimeOnScreen>(); dBConn = GameObject.Find("DB Connect").GetComponent <DBConnector>(); int score = 0; if (levelText.text == "Level 1") { score = (int)(50 * Math.Pow(0.99, (ts.gameTimer - 20)) + 50 * Math.Pow(0.9, (cs.wrongCounter - 1))); } else if (levelText.text == "Level 2") { score = (int)(50 * Math.Pow(0.99, (ts.gameTimer - 25)) + 50 * Math.Pow(0.9, (cs.wrongCounter - 1))); } else if (levelText.text == "Level 3") { score = (int)(50 * Math.Pow(0.99, (ts.gameTimer - 30)) + 50 * Math.Pow(0.9, (cs.wrongCounter - 1))); } else if (levelText.text == "Level 4") { score = (int)(50 * Math.Pow(0.99, (ts.gameTimer - 35)) + 50 * Math.Pow(0.9, (cs.wrongCounter - 1))); } else if (levelText.text == "Level 5") { score = (int)(50 * Math.Pow(0.99, (ts.gameTimer - 40)) + 50 * Math.Pow(0.9, (cs.wrongCounter - 1))); } if (score > 100) { score = 100; } EOLmessage.text = "Time: " + Time.text + "\nTotal Incorrect Answers: " + cs.wrongCounter + "\nScore: " + score + "/100"; dBConn.InsertScore(cs.wrongCounter, Time.text, score, levelText.text); }
void Awake() { instance = this; UpdateText(); }
// string quesToDb = ""; // string statToDb = ""; void Start() { cs = kart.GetComponent <CubeCounter>(); wrongs = GameObject.Find("Incorrect Counter").GetComponent <Text>(); }
// Use this for initialization void Start() { GameOver = false; Active_Cube_Counter = GameObject.Find("Active_Cube_Counter"); A_C_C = Active_Cube_Counter.GetComponent <CubeCounter> (); }