Added new texture for when meat is motionless

This commit is contained in:
Gregory Campbell
2020-02-09 23:00:23 -05:00
parent 6ea501509c
commit 9c541a976d
15 changed files with 211 additions and 0 deletions
+8
View File
@@ -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