Files
gmtk-2021/Assets/DirectionPaddle.cs
Jan Groß 80178a0120 Added basic robot arm controls
Added conveyor piston
Fixed conveyor friction
2021-06-12 19:19:34 +02:00

23 lines
549 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DirectionPaddle : MonoBehaviour
{
public GameObject piston;
public void Switch()
{
gameObject.SetActive(!gameObject.activeSelf);
}
public void InteractNode()
{
this.GetComponent<Collider>().enabled = !this.GetComponent<Collider>().enabled;
this.GetComponent<MeshRenderer>().enabled = !this.GetComponent<MeshRenderer>().enabled;
piston.SetActive(!piston.activeSelf);
}
}