void OnTriggerEnter(Collider other) { if(other.gameObject.CompareTag("Player")) { combo = gameObject.AddComponent<PunchCombo>(); GameStats.SetBulletSpeed(); GameStats.SetCameraLow(); } }
// Use this for initialization void Start() { PunchCombo newCombo = new PunchCombo(); int numCombo = (int)Random.Range(3f, 12f); List <int> comboData = new List <int>(); for (int i = 0; i < numCombo; i++) { comboData.Add(Random.Range(10, 100)); } newCombo.comboData = comboData; newCombo.img = img; newCombo.input = input; newCombo.background = background; newCombo.spriteList = spriteList; newCombo.timer = newCombo.comboData[0]; combos.Add(newCombo); gc = (GameController)FindObjectOfType(typeof(GameController)); playing = true; }