C# Class RayCastMgr, UnityDemo

Inheritance: MonoBehaviour
Mostra file Open project: rouchen/UnityDemo

Protected Properties

Property Type Description
cbFunction RayCastCallback

Public Methods

Method Description
OnRayCast ( Vector3 hitPozs, Camera cam, float dis = 1000f ) : void

RayCast interface

Register ( string layers, RayCastCallback rayCastCb ) : bool

註冊RayCastMgr

UnRegister ( RayCastCallback rayCastCb ) : bool

反註冊RayCastMgr

Protected Methods

Method Description
ResetLayerMask ( ) : void

設定mask

Start ( ) : void
Update ( ) : void

測試用.

Private Methods

Method Description
RayCastMgr ( ) : System.Collections

Method Details

OnRayCast() public method

RayCast interface
public OnRayCast ( Vector3 hitPozs, Camera cam, float dis = 1000f ) : void
hitPozs Vector3 position Vector3 list
cam Camera
dis float
return void

Register() public method

註冊RayCastMgr
public Register ( string layers, RayCastCallback rayCastCb ) : bool
layers string layer name
rayCastCb RayCastCallback callback(RaycastHit[] rayCastHit)
return bool

ResetLayerMask() protected method

設定mask
protected ResetLayerMask ( ) : void
return void

Start() protected method

protected Start ( ) : void
return void

UnRegister() public method

反註冊RayCastMgr
public UnRegister ( RayCastCallback rayCastCb ) : bool
rayCastCb RayCastCallback callback
return bool

Update() protected method

測試用.
protected Update ( ) : void
return void

Property Details

cbFunction protected_oe property

protected RayCastCallback cbFunction
return RayCastCallback