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.
First why don't you make the PyramidNode a nice shade of blue, as in Listing 12-2 ?
Listing 12-2 . PyramidNode Material
pyramidNode.geometry?.firstMaterial?.diffuse.contents
= UIColor.blueColor()
pyramidNode.geometry?.firstMaterial?.specular.contents
= UIColor.blueColor()
Search WWH ::




Custom Search