public void LabelMake() { type = (CHEMICAL)Random.Range (1,(int)CHEMICAL.Size); switch (type) { case CHEMICAL.Beryllium: Label.sprite = Labels[0]; break; case CHEMICAL.Boron: Label.sprite = Labels[1]; break; case CHEMICAL.Carbon: Label.sprite = Labels[2]; break; case CHEMICAL.Fluorine: Label.sprite = Labels[3]; break; case CHEMICAL.Helium: Label.sprite = Labels[4]; break; case CHEMICAL.Hydrogen: Label.sprite = Labels[5]; break; case CHEMICAL.Lithium: Label.sprite = Labels[6]; break; case CHEMICAL.Neon: Label.sprite = Labels[7]; break; case CHEMICAL.Nitrogen: Label.sprite = Labels[8]; break; case CHEMICAL.Oxygen: Label.sprite = Labels[9]; break; case CHEMICAL.Sodium: Label.sprite = Labels[10]; break; } }
public void Consume(CHEMICAL type) { //todo: create combo function for evaluation here. if(!reactions[(int)type].values[(int)lastType]) { //store last type to continue the combo lastType = type; chainPoints++; SoundManager.Instance.PlaySoundRandom(SoundManager.SoundType.SFX, "combogood"); Debug.Log("Combo: x"+chainPoints); } else { lastType = CHEMICAL.Empty; chainPoints = 0; SoundManager.Instance.PlaySoundRandom(SoundManager.SoundType.SFX, "combobad"); Debug.Log("Combo Lost!"); } score += chainPoints * FLASK_SCORE * ( 1 + (uint) currentLevelNumber / 10); Debug.Log ("Score: "+score); }