本文整理汇总了C#中EffectNode.SetAffectorList方法的典型用法代码示例。如果您正苦于以下问题:C# EffectNode.SetAffectorList方法的具体用法?C# EffectNode.SetAffectorList怎么用?C# EffectNode.SetAffectorList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EffectNode
的用法示例。
在下文中一共展示了EffectNode.SetAffectorList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
protected void Init()
{
//added 2012.6.24
InitCollision();
//fixed 2012.6.2. ignoring the red errors.
if (ClientTransform == null)
{
Debug.LogWarning("effect layer: "+ gameObject.name + " didn't assign a client transform, automaticly set to itself.");
ClientTransform = transform;
}
AvailableENodes = new EffectNode[MaxENodes];
ActiveENodes = new EffectNode[MaxENodes];
for (int i = 0; i < MaxENodes; i++)
{
EffectNode n = new EffectNode(i, ClientTransform, SyncClient, this);
ArrayList afts = InitAffectors(n);
n.SetAffectorList(afts);
if (RenderType == 0)
n.SetType(SpriteWidth, SpriteHeight, (STYPE)SpriteType, (ORIPOINT)OriPoint, SpriteUVStretch, MaxFps);
else if (RenderType == 1)
{
float rwidth = RibbonWidth;
float rlen = RibbonLen;
if (UseRandomRibbon)
{
rwidth = Random.Range(RibbonWidthMin, RibbonWidthMax);
rlen = Random.Range(RibbonLenMin, RibbonLenMax);
}
n.SetType(FaceToObject, FaceObject, rwidth, MaxRibbonElements, rlen, ClientTransform.position + EmitPoint, StretchType, MaxFps);
}
else if (RenderType == 2)
n.SetType(ConeSize,ConeSegment,ConeAngle, transform.rotation * OriVelocityAxis,0,MaxFps,UseConeAngleChange,ConeDeltaAngle);
AvailableENodes[i] = n;
}
AvailableNodeCount = MaxENodes;
emitter = new Emitter(this);
}
示例2: Init
protected void Init()
{
//added 2012.6.24
InitCollision();
Owner = transform.parent.gameObject.GetComponent<XffectComponent>();
if (Owner == null)
Debug.LogError("you must set EffectLayer to be XffectComponent's child.");
//fixed 2012.6.2. ignoring the red errors.
if (ClientTransform == null)
{
Debug.LogWarning("effect layer: "+ gameObject.name + " haven't assign a client transform, automaticly set to itself.");
ClientTransform = transform;
}
AvailableENodes = new EffectNode[MaxENodes];
ActiveENodes = new EffectNode[MaxENodes];
for (int i = 0; i < MaxENodes; i++)
{
EffectNode n = new EffectNode(i, ClientTransform, SyncClient, this);
List<Affector> afts = InitAffectors(n);
n.SetAffectorList(afts);
if (RenderType == 0)
n.SetType(SpriteWidth, SpriteHeight, (STYPE)SpriteType, (ORIPOINT)OriPoint, SpriteUVStretch, 60f);
else if (RenderType == 1)
{
float rwidth = RibbonWidth;
float rlen = RibbonLen;
if (UseRandomRibbon)
{
rwidth = Random.Range(RibbonWidthMin, RibbonWidthMax);
rlen = Random.Range(RibbonLenMin, RibbonLenMax);
}
n.SetType(FaceToObject, FaceObject, rwidth, MaxRibbonElements, rlen, ClientTransform.position + EmitPoint, StretchType, 60f);
}
else if (RenderType == 2)
{
n.SetType(ConeSize,ConeSegment,ConeAngle, transform.rotation * OriVelocityAxis,0,60f,UseConeAngleChange,ConeDeltaAngle);
}
else if (RenderType == 3)
{
Vector3 dir = Vector3.zero;
if (OriVelocityAxis == Vector3.zero)
{
OriVelocityAxis = Vector3.up;
}
dir = transform.rotation * OriVelocityAxis;
n.SetType(CMesh,dir,60f);
}
AvailableENodes[i] = n;
}
AvailableNodeCount = MaxENodes;
emitter = new Emitter(this);
}
示例3: Init
protected void Init()
{
AvailableENodes = new EffectNode[MaxENodes];
ActiveENodes = new EffectNode[MaxENodes];
for (int i = 0; i < MaxENodes; i++)
{
EffectNode n = new EffectNode(i, ClientTransform, SyncClient, this);
ArrayList afts = InitAffectors(n);
n.SetAffectorList(afts);
if (RenderType == 0)
n.SetType(SpriteWidth, SpriteHeight, (STYPE)SpriteType, (ORIPOINT)OriPoint, SpriteUVStretch, MaxFps);
else
n.SetType(RibbonWidth, MaxRibbonElements, RibbonLen, ClientTransform.position, StretchType, MaxFps);
AvailableENodes[i] = n;
}
AvailableNodeCount = MaxENodes;
emitter = new Emitter(this);
}