Added new texture for when meat is motionless
This commit is contained in:
@@ -9,11 +9,13 @@ public class MovingBlock : MonoBehaviour
|
||||
public bool zaxis;
|
||||
public float speed;
|
||||
public GameObject block;
|
||||
public Material rotten;
|
||||
|
||||
bool moveXpos;
|
||||
bool moveZpos;
|
||||
|
||||
Vector3 startPos;
|
||||
MeshRenderer mr;
|
||||
|
||||
void Start()
|
||||
{
|
||||
@@ -48,6 +50,12 @@ public class MovingBlock : MonoBehaviour
|
||||
moveZpos = false;
|
||||
}
|
||||
|
||||
if(!xaxis && !zaxis)
|
||||
{
|
||||
mr = this.GetComponent<MeshRenderer>();
|
||||
mr.material = rotten;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
|
||||
Reference in New Issue
Block a user