LensFlare.brightness 亮度

var brightness : float

Description描述

The strength of the flare.

眩光的强度。

This controls the size and brightness of the flare elements.

这个控制眩光元素的大小和亮度。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public LensFlare lf;
	public Transform tr;
	void Update() {
		lf.brightness = 1 / Vector3.Distance(lf.transform.position, tr.position);
	}
}
// Increments the strenght of the Lensflare lf when the Transform tr
// gets closer to the Lens flare
//当tr接近镜头光晕时,镜头光晕的强度增强

var lf : LensFlare;
var tr : Transform;

function Update() {
	lf.brightness = 1/Vector3.Distance(lf.transform.position, tr.position);
}
Page last updated: 2010-12-28