Version: 2020.1
言語: 日本語

PointEffector2D

class in UnityEngine

/

継承:Effector2D

マニュアルに切り替える

説明

ポイント(位置)に対して引力/反発する力を適用します。

ソースの Collider2D がトリガーされると、ターゲットの Collider2D と重なるたびにエフェクターの力が適用されます。ソースの Collider がトリガーされておらず、ターゲットの Collider2D がソースと接触しているときのみエフェクターは力を適用します。

このエフェクターは、ターゲット側の Collider2D が定義された領域をオーバーラップすることができ、トリガーとして設定されているソース側の Collider2D で動作するように設計されています。

変数

angularDragリジッドボディに適用する Angular Drag
distanceScaleスケールはソース側とターゲット側の間の距離を計算したものに適用されます
dragリジッドボディに適用する Linear Drag の値
forceMagnitude適用する力の大きさ
forceModeエフェクターの力を適用するために使用されるモード
forceSourceエフェクターの中心点(Centroid Point)を計算するために使用されるソース。ターゲットからの距離は、この中心点から定められます
forceTargetエフェクターがあらゆる力を適用する場所
forceVariation適用される力の大きさの範囲

継承メンバー

変数

enabled有効であれば更新され、無効であれば更新されません。
isActiveAndEnabledHas the Behaviour had active and enabled called?
gameObjectこのコンポーネントはゲームオブジェクトにアタッチされます。コンポーネントはいつもゲームオブジェクトにアタッチされています。
tagゲームオブジェクトのタグ
transformThe Transform attached to this GameObject.
colliderMaskマスクはエフェクターを作用させるレイヤーを指定するのに使用します。
useColliderMaskコライダーマスクやグローバル衝突マトリクスを適用させるか
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameオブジェクト名

Public 関数

BroadcastMessageゲームオブジェクトまたは子オブジェクトにあるすべての MonoBehaviour を継承したクラスにある methodName 名のメソッドを呼び出します。
CompareTagこのゲームオブジェクトは tag とタグ付けされているかどうか
GetComponentReturns the component of Type type if the GameObject has one attached, null if it doesn't. Will also return disabled components.
GetComponentInChildren GameObject や深さ優先探索を活用して、親子関係にある子オブジェクトから type のタイプのコンポーネントを取得します。
GetComponentInParent GameObject や深さ優先探索を活用して、親子関係にある親オブジェクトから type のタイプのコンポーネントを取得します。
GetComponents GameObject から type のタイプのコンポーネントを「すべて」取得します。
GetComponentsInChildrenReturns all components of Type type in the GameObject or any of its children. Works recursively.
GetComponentsInParent GameObject や深さ優先探索を活用して、親子関係にある親オブジェクトから type のタイプのコンポーネントを「すべて」取得します。
SendMessageゲームオブジェクトにアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します
SendMessageUpwardsゲームオブジェクトと親(の親、さらに親 ... )にアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します
TryGetComponentGets the component of the specified type, if it exists.
GetInstanceIDオブジェクトのインスタンス ID を返します
ToStringReturns the name of the object.

Static 関数

DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfTypeタイプ type から最初に見つけたアクティブのオブジェクトを返します
FindObjectsOfTypeGets a list of all loaded objects of Type type.
Instantiateoriginal のオブジェクトをクローンします

Operator

boolオブジェクトが存在するかどうか
operator !=二つのオブジェクトが異なるオブジェクトを参照しているか比較します
operator ==2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。