@@ -53,6 +53,20 @@ typedef NS_ENUM(NSUInteger, CCLightType)
5353 */
5454@property (nonatomic , assign ) float intensity;
5555
56+ /* * The specular color of the light. As described below, the color is modulated by the
57+ * specular intensity value to determine the contribution of the light to the lighting
58+ * effect. This color is used when computing the light's specular (shiny) contribution
59+ * to the lighting effect.
60+ */
61+ @property (nonatomic , strong ) CCColor* specularColor;
62+
63+ /* * The brightness of the light's specular color. This value is in the range [0..1]
64+ * with 0 resulting in no contribution from the specular color to the final image
65+ * (the specular color effectively becomes black) and 1 resulting in full contribution
66+ * from this light.
67+ */
68+ @property (nonatomic , assign ) float specularIntensity;
69+
5670/* * The ambient color of the light. As described below, the color is modulated by the
5771 * ambient intensity value to determine the contribution of the light to the lighting
5872 * effect. The ambient color contributes to the lighting effect independent of the light's
@@ -101,15 +115,28 @@ typedef NS_ENUM(NSUInteger, CCLightType)
101115/* *
102116 * Initializes a CCLightNode object with the specified parameters.
103117 *
104- * @param type The type of the light.
105- * @param color The primary color of the light.
106- * @param intensity The brightness of the light's primary color.
107- * @param ambientColor The ambient color of the light.
108- * @param ambientIntensity The brightness of the light's ambient color.
118+ * @param type The type of the light.
119+ * @param color The primary color of the light.
120+ * @param intensity The brightness of the light's primary color.
109121 *
110122 * @return The CCLighttNode object.
111123 */
112- -(id )initWithType : (CCLightType)type color : (CCColor *)color intensity : (float )intensity ambientColor : (CCColor *)ambientColor ambientIntensity : (float )ambientIntensity ;
124+ -(id )initWithType : (CCLightType)type color : (CCColor *)color intensity : (float )intensity ;
125+
126+ /* *
127+ * Initializes a CCLightNode object with the specified parameters.
128+ *
129+ * @param type The type of the light.
130+ * @param color The primary color of the light.
131+ * @param intensity The brightness of the light's primary color.
132+ * @param specularColor The specular color of the light.
133+ * @param specularIntensity The brightness of the light's specular color.
134+ * @param ambientColor The ambient color of the light.
135+ * @param ambientIntensity The brightness of the light's ambient color.
136+ *
137+ * @return The CCLighttNode object.
138+ */
139+ -(id )initWithType : (CCLightType)type color : (CCColor *)color intensity : (float )intensity specularColor : (CCColor *)specularColor specularIntensity : (float )specularIntensity ambientColor : (CCColor *)ambientColor ambientIntensity : (float )ambientIntensity ;
113140
114141
115142// / -----------------------------------------------------------------------
@@ -119,15 +146,28 @@ typedef NS_ENUM(NSUInteger, CCLightType)
119146/* *
120147 * Creates a CCLightNode object with the specified parameters.
121148 *
122- * @param type The type of the light.
123- * @param color The primary color of the light.
124- * @param intensity The brightness of the light's primary color.
125- * @param ambientColor The ambient color of the light.
126- * @param ambientIntensity The brightness of the light's ambient color.
149+ * @param type The type of the light.
150+ * @param color The primary color of the light.
151+ * @param intensity The brightness of the light's primary color.
152+ *
153+ * @return An initialized CCLightNode object.
154+ */
155+ +(id )lightWithType : (CCLightType)type color : (CCColor *)color intensity : (float )intensity ;
156+
157+ /* *
158+ * Creates a CCLightNode object with the specified parameters.
159+ *
160+ * @param type The type of the light.
161+ * @param color The primary color of the light.
162+ * @param intensity The brightness of the light's primary color.
163+ * @param specularColor The specular color of the light.
164+ * @param specularIntensity The brightness of the light's specular color.
165+ * @param ambientColor The ambient color of the light.
166+ * @param ambientIntensity The brightness of the light's ambient color.
127167 *
128168 * @return An initialized CCLightNode object.
129169 */
130- +(id )lightWithType : (CCLightType)type color : (CCColor *)color intensity : (float )intensity ambientColor : (CCColor *)ambientColor ambientIntensity : (float )ambientIntensity ;
170+ +(id )lightWithType : (CCLightType)type color : (CCColor *)color intensity : (float )intensity specularColor : (CCColor *) specularColor specularIntensity : ( float ) specularIntensity ambientColor : (CCColor *)ambientColor ambientIntensity : (float )ambientIntensity ;
131171
132172
133173@end
0 commit comments