You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
474 B
18 lines
474 B
using System;
|
|
using UnityEngine;
|
|
using UnityEngine.Serialization;
|
|
|
|
public class Pit : MonoBehaviour
|
|
{
|
|
public float startmass;
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.isTrigger) return;
|
|
SoundEffectManager.Play("Pit");
|
|
startmass = other.GetComponent<Rigidbody>().mass;
|
|
other.GetComponent<Rigidbody>().mass = 100;
|
|
other.GetComponent<Rigidbody>().mass = startmass;
|
|
other.GetComponent<PositionReset>().Reset();
|
|
}
|
|
}
|