Game Development Reference
In-Depth Information
Multiply
: This attribute is computed after all the other attributes and adds a
color to the material.
Appling Materials to Your Obstacles
Now that you have a basic understanding of the attributes to the
SCNMaterial
, let's
head over to the
Obstacle
class and add some material to your obstacles.
Listing 12-2
.
PyramidNode Material
pyramidNode.geometry?.firstMaterial?.diffuse.contents
= UIColor.blueColor()
pyramidNode.geometry?.firstMaterial?.specular.contents
= UIColor.blueColor()