2021-05-17 12:24:26 -05:00

26 lines
630 B
C#

using UnityEngine;
//! This class is attached to all brick block prefabs.
public class Brick : MonoBehaviour
{
public string ID = "unassigned";
public string creationMethod;
public int address;
private StateManager stateManager;
//! Called by unity engine on start up to initialize variables.
public void Start()
{
stateManager = FindObjectOfType<StateManager>();
}
//! Called once per frame by unity engine.
public void Update()
{
if (ID == "unassigned" || stateManager.Busy())
return;
GetComponent<PhysicsHandler>().UpdatePhysics();
}
}