public void OnTriggerEnter(Collider other) { CyclopsPlayer rPlayer = other.GetComponentInParent <CyclopsPlayer>(); if (rPlayer) { rPlayer.StartEyeBlast(); } }
void OnTriggerEnter(Collider collider) { Rigidbody rColRigid = collider.GetComponent <Rigidbody>(); CyclopsPlayer rPlayer = collider.GetComponent <CyclopsPlayer>(); if (rColRigid && !rPlayer) { rColRigid.AddExplosionForce(500, transform.position, m_dMaxDiameter); } }
private void OnTriggerEnter(Collider other) { CyclopsPlayer rPlayer = other.GetComponentInParent <CyclopsPlayer>(); if (rPlayer) { rPlayer.m_dSHOOTEYEBLASTS = false; rPlayer.SetFinishedLevel(); Destroy(transform.root.gameObject); } }
private void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Explosion") { gameOverScreen.gameObject.SetActive(true); isGameOver = true; GameObject rPlayer = GameObject.FindGameObjectWithTag("Player"); if (rPlayer) { CyclopsPlayer rCyclops = rPlayer.GetComponent <CyclopsPlayer>(); if (rCyclops) { //rCyclops.ResetLevelOnNextBlink(); } StartCoroutine(GameOverScreen_Cor()); } } }