Color.operator * 运算符 乘法
static operator * (a : Color, b : Color) : Color
Description描述
Multiplies two colors together. Each component is multiplied separately.
两个颜色相乘,每个组件分别相乘。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public Color grayColor = Color.gray * Color.white;
}// white * gray = gray
//白色 x 灰色 =灰色
var grayColor: Color = Color.gray * Color.white;middot; static operator * (a : Color, b : float) : Color
Description描述
Multiplies color a by the float b. Each color component is scaled separately.
浮点数b乘以颜色a,每个颜色组件分别相乘。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public Color whiteColor = Color.gray * 2;
}// gray * 2 = White
//灰色 x 2 = 白色
var whiteColor: Color = Color.gray * 2;• static operator * (b : float, a : Color) : Color
Description描述
Multiplies color a by the float b. Each color component is scaled separately.
浮点数b乘以颜色a,每个颜色组件分别相乘。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public Color whiteColor = 2 * Color.gray;
}// 2 * gray = White
//2 x 灰色= 白色
var whiteColor: Color = 2 * Color.gray;最后修改:2010年12月16日 Thursday 22:23
