parent
3257f23245
commit
4a4e3be216
@ -1,10 +1,16 @@
|
|||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.Serialization;
|
||||||
|
|
||||||
public class Pit : MonoBehaviour
|
public class Pit : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
public float startmass;
|
||||||
private void OnTriggerEnter(Collider other)
|
private void OnTriggerEnter(Collider other)
|
||||||
{
|
{
|
||||||
|
if (other.isTrigger) return;
|
||||||
|
startmass = other.GetComponent<Rigidbody>().mass;
|
||||||
|
other.GetComponent<Rigidbody>().mass = 100;
|
||||||
|
other.GetComponent<Rigidbody>().mass = startmass;
|
||||||
other.GetComponent<PositionReset>().Reset();
|
other.GetComponent<PositionReset>().Reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,24 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class StandUpCollider : MonoBehaviour
|
||||||
|
{
|
||||||
|
public bool ispushing;
|
||||||
|
|
||||||
|
private void OnTriggerEnter(Collider other)
|
||||||
|
{
|
||||||
|
IceBlockPush block = other.gameObject.GetComponent<IceBlockPush>();
|
||||||
|
if (block != null)
|
||||||
|
{
|
||||||
|
ispushing = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnTriggerExit(Collider other)
|
||||||
|
{
|
||||||
|
IceBlockPush block = other.gameObject.GetComponent<IceBlockPush>();
|
||||||
|
if (block != null)
|
||||||
|
{
|
||||||
|
ispushing = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 19aae932aa4446c4788d84deb1116128
|
||||||
Loading…
Reference in new issue