Vector3
- Angle
- ClampMagnitude
- Cross
- Distance
- Dot
- forward
- Lerp
- magnitude
- Max
- Min
- MoveTowards
- normalized
- Normalize
- one
- operator !=
- operator *
- operator +
- operator -
- operator /
- operator ==
- OrthoNormalize
- Project
- Reflect
- right
- RotateTowards
- Scale
- Slerp
- SmoothDamp
- sqrMagnitude
- this [int index]
- ToString
- up
- Vector3
- x
- y
- zero
- z
Vector3.operator == 运算符 等于
static operator == (lhs : Vector3, rhs : Vector3) : bool
Description描述
Returns true if the vectors are equal.
如果两个向量相等,返回真。
This will also return true for vectors that are really close to being equal.
对于非常接近相等向量,也将返回真。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public Transform other;
public void Awake() {
if (other && transform.position == other.position)
print("I'm at the same place as the other transform!");
}
}
var other : Transform;
if (other && transform.position == other.position)
print ("I'm at the same place as the other transform!");
最后修改:2010年12月20日 Monday 23:36