basic conveyer function and direction switching stub
This commit is contained in:
21
Assets/Scripts/Items/DestructibleObject.cs
Normal file
21
Assets/Scripts/Items/DestructibleObject.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class DestructibleObject : MonoBehaviour
|
||||
{
|
||||
private Vector3 originalPosition;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
originalPosition = gameObject.transform.position;
|
||||
}
|
||||
|
||||
public void Respawn()
|
||||
{
|
||||
gameObject.GetComponent<Rigidbody>().isKinematic = true;
|
||||
gameObject.transform.position = originalPosition;
|
||||
gameObject.GetComponent<Rigidbody>().isKinematic = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user