示例#1
0
        public override void TriggerTile(Lemming lemming)
        {
            if (GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Level>().DidVolcanoErupt[transform.position])
            {
                return;
            }

            Instantiate(explosion, transform.position, transform.rotation);
            GetComponent <AudioSource>().PlayOneShot(GetComponent <AudioSource>().clip);

            lemming.Health -= directDamage;
            GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Level>().DidVolcanoErupt[transform.position] = true;
            foreach (GameObject collateralDamage in GameObject.FindGameObjectsWithTag("Lemming"))
            {
                if ((collateralDamage.transform.position - transform.position).magnitude < 2.1)
                {
                    collateralDamage.GetComponent <Lemming>().Health -= indirectDamage;
                }
            }
        }
示例#2
0
		public override void TriggerTile(Lemming lemming)
		{
			GetComponent<AudioSource>().PlayOneShot(GetComponent<AudioSource>().clip);
			lemming.Health -= damage;
		}
示例#3
0
 public virtual void TriggerTile(Lemming lemming)
 {
 }