Color.operator /运算符 除法

static operator / (a : Color, b : float) : Color

Description描述

Divides color a by the float b. Each color component is scaled separately.

颜色a除以浮点数b,每个颜色组件分别相除。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public Color grayColor = Color.white / 2;
}
// white / 2 = gray
//白色 ÷ 2 = 灰色
var grayColor : Color = Color.white / 2;
Page last updated: 2010-12-16