Tanoda
ChangeHandMaterial.cs
Go to the documentation of this file.
1using System.Collections;
2using System.Collections.Generic;
3using UnityEngine;
4
5public class ChangeHandMaterial : MonoBehaviour
6{
7 public SkinnedMeshRenderer RightHand, LeftHand;
9 // Start is called before the first frame update
10 void Start()
11 {
12 }
13
14 // Update is called once per frame
15 void Update()
16 {
17 if (ConveyorBeltManager.instance.started)
18 {
19 RightHand.materials[0] = OrigRight;
20 LeftHand.materials[0] = OrigLeft;
21 RightHand.material = OrigRight;
22 LeftHand.material = OrigLeft;
23 }
24 else
25 {
26 RightHand.materials[0] = OnTopRight;
27 LeftHand.materials[0] = OnTopLeft;
28 RightHand.material = OnTopRight;
29 LeftHand.material = OnTopLeft;
30 }
31
32 }
33}
SkinnedMeshRenderer LeftHand
SkinnedMeshRenderer RightHand