当前位置: 首页>>代码示例>>C#>>正文


C# EffectNode.SetAffectorList方法代码示例

本文整理汇总了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);
    }
开发者ID:rmkeezer,项目名称:fpsgame,代码行数:38,代码来源:EffectLayer.cs

示例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);
    }
开发者ID:sylafrs,项目名称:rugby,代码行数:57,代码来源:EffectLayer.cs

示例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);
 }
开发者ID:zi-su,项目名称:React,代码行数:18,代码来源:EffectLayer.cs


注:本文中的EffectNode.SetAffectorList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。