예제 #1
0
 public override void OnSelected(Hand hand)
 {
     isBuilding       = true;
     objInstance      = Instantiate(objectToPlace);
     buildingCollider = objInstance.GetComponentInChildren <Collider>();
     handSelector     = hand.GetComponentInChildren <HandSelector>();
     selectedHand     = hand;
 }
예제 #2
0
    private void ChangeAllColors(Color color)
    {
        var mats = objInstance.GetComponentInChildren <MeshRenderer>().materials;

        foreach (var mat in mats)
        {
            mat.SetColor("_Color", color);
        }
    }