예제 #1
0
 private void OnCollisionEnter(Collision collision)
 {
     if (collision.collider.tag == "Player" && !hit)
     {
         Score.Points += points;
         BonusDisplay.ShowBonus(ScoreTypes.Destruction, "Destruction", points);
         hit = true;
     }
 }
예제 #2
0
 public virtual void Cleared()
 {
     Score.Points        += bonusPoints;
     Timer.timeRemaining += bonusTime;
     areasCleared++;
     Notifications.SendNotification("Cleared " + areaName + " +" + bonusTime + " seconds!");
     FindObjectOfType <Animations>().Celebrate();
     BonusDisplay.ShowBonus(ScoreTypes.ClearedArea, "Cleared " + areaName, bonusPoints);
     Destroy(gameObject);
 }
 public override void Cleared()
 {
     Score.Points        += bonusPoints;
     Timer.timeRemaining += bonusTime;
     BonusDisplay.ShowBonus(ScoreTypes.ClearedArea, "Cleared " + areaName, bonusPoints);
     if (OnComplete.GetPersistentEventCount() > 0)
     {
         OnComplete.Invoke();
     }
     Notifications.SendNotification(notif);
 }
예제 #4
0
 private void Break()
 {
     hit           = true;
     Score.Points += points;
     //BonusDisplay.ShowBonus("Destruction", points,displayTime);
     BonusDisplay.ShowBonus(ScoreTypes.Destruction, "Destruction", points);
     Instantiate(piece1, transform.position, transform.rotation);
     if (destroyObject == true)
     {
         Invoke("destroy", 0.05f);
     }
 }
예제 #5
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "Player")
     {
         LongGrassEffect.longGrassCut = true;
         Score.Points += scoreAdd;
         BonusDisplay.ShowBonus(ScoreTypes.CutWeeds, "Cut Weeds", scoreAdd);
         Timer.timeRemaining += addedTime;
         if (area != null)
         {
             area.RemoveObj(gameObject);
         }
         if (effect != null)
         {
             Instantiate(effect, transform.position, Quaternion.identity);
         }
         Destroy(this.gameObject);
     }
 }