• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Effects类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Effects的典型用法代码示例。如果您正苦于以下问题:C# Effects类的具体用法?C# Effects怎么用?C# Effects使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Effects类属于命名空间,在下文中一共展示了Effects类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: HandleTranslatedtoHiddenPosition

 public void HandleTranslatedtoHiddenPosition(Effects.Effect effect)
 {
     Visible = false;
     if (OnHidden != null) {
         OnHidden (this);
     }
 }
开发者ID:fordream,项目名称:Sunfish,代码行数:7,代码来源:Popup.cs


示例2: TransitionState

    public void TransitionState(OnEndFadeIn FadeIn,OnEndFadeOut FadeOut,_TransitionType TT)
    {
        switch (TT) {
        case _TransitionType.FadeOut_In:
            CurrentEffectObj = Instantiate (EffectObj)as GameObject;
            CurrentEffectScript = CurrentEffectObj.GetComponentInChildren<Effects> ();
            CurrentEffectScript.EndFadeOutEvent += () => {
                FadeOut();
                doFadeIn ();
            };

            CurrentEffectScript.EndFadeInEvent += () => {
                FadeIn ();
                Destroy (CurrentEffectObj);
            };

            doFadeOut ();
            break;

        case _TransitionType.No_Effect:
            FadeOut ();
            FadeIn ();
            break;
        }
    }
开发者ID:MasatomoSegawa,项目名称:Life30,代码行数:25,代码来源:TransitionManager.cs


示例3: OutputEnum

        public static void OutputEnum(Effects.Property enumProperty, Formatter output)
        {
            OutputVersionConditional(enumProperty.WinVer, output);

            output.WriteLine("[version(VERSION)]");
            output.WriteLine("typedef enum " + enumProperty.TypeNameIdl);
            output.WriteLine("{");
            output.Indent();

            for (int i = 0; i < enumProperty.EnumFields.FieldsList.Count; ++i)
            {
                var enumValue = enumProperty.EnumFields.FieldsList[i];
                if (i != (enumProperty.EnumFields.FieldsList.Count - 1))
                {
                    output.WriteLine(enumValue.Name + " = " + i.ToString() + ",");
                }
                else
                {
                    output.WriteLine(enumValue.Name + " = " + i.ToString());
                }
            }
            output.Unindent();
            output.WriteLine("} " + enumProperty.TypeNameIdl + ";");

            EndVersionConditional(enumProperty.WinVer, output);
        }
开发者ID:PlainSailing,项目名称:Win2D,代码行数:26,代码来源:OutputEffectType.cs


示例4: TargetSpell

    public TargetSpell(JSONObject js) : base(js)
    {
        Id = (int)js.GetField(js.keys[0]).n;
		AreaId = (int)js.GetField("areaId").n;
		EffectsArea = new Effects(js.GetField("effectsAreaIds"));
		EffectsAreaCrit = new Effects(js.GetField("effectsAreaCritIds"));
		_rangeId = (int)js.GetField("rangeId").n;
    }
开发者ID:LilTsubaki,项目名称:Les-fragments-d-Erule,代码行数:8,代码来源:TargetSpell.cs


示例5: Start

 // Use this for initialization
 void Start()
 {
     if (!player)
         player = GetComponent<Player> ();
     if(!rb)
         rb = GetComponent<Rigidbody>();
     effects = Player.Effects;
 }
开发者ID:eeveelution,项目名称:Wynnunity_Source,代码行数:9,代码来源:Walk.cs


示例6: DialogueConversationNode

 public DialogueConversationNode(bool waitUserInteraction)
 {
     dialogue = new List<ConversationLine>();
     nextNode = null;
     terminal = true;
     effects = new Effects();
     this.keepShowing = waitUserInteraction;
 }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:8,代码来源:DialogueConversationNode.cs


示例7: Awake

	public virtual void Awake()
	{
		//DefaultPosition = transform.position;
		//DefaultRotation = transform.rotation;	
		Effects = new Effects();
		_renderer = GetComponent<Renderer>();
		if (_renderer == null)
			_renderer = GetComponentInChildren<Renderer>();
	}
开发者ID:GroupByStudios,项目名称:TDS_Gauss,代码行数:9,代码来源:WeaponBase.cs


示例8: SelfSpell

    public SelfSpell(JSONObject js) : base(js)
    {
        Id = (int)js.GetField(js.keys[0]).n;
        AreaId = (int)js.GetField("areaId").n;
		EffectsArea = new Effects(js.GetField("effectsAreaIds"));
		EffectsAreaCrit = new Effects(js.GetField("effectsAreaCritIds"));
		_effects = new Effects(js.GetField("effectsIds"));
		_effectsCrit = new Effects(js.GetField("effectsCritIds"));
    }
开发者ID:LilTsubaki,项目名称:Les-fragments-d-Erule,代码行数:9,代码来源:SelfSpell.cs


示例9: Cutscene

 /**
  * Creates a new cutscene
  *
  * @param type
  *            The type of the scene
  * @param id
  *            The id of the scene
  */
 protected Cutscene(GeneralSceneSceneType type, string id)
     : base(type, id)
 {
     effects = new Effects();
     destinyX = int.MinValue;
     destinyY = int.MaxValue;
     transitionType = NextSceneEnumTransitionType.NO_TRANSITION;
     transitionTime = 0;
     next = GOBACK;
 }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:18,代码来源:Cutscene.cs


示例10: SimplifierContext

 public SimplifierContext(bool inGlobalScope, bool keepFunctionNames, NameSupply nameSupply, Func<Expression, bool> isValue)
 {
     InGlobalScope = inGlobalScope;
     KeepFunctionNames = keepFunctionNames;
     NameSupply = nameSupply;
     subst = new Map<Identifier, Expression>();
     statements = null;
     contextEffects = Effects.Bottom;
     this.isValue = isValue;
 }
开发者ID:modulexcite,项目名称:IL2JS,代码行数:10,代码来源:SimplifierContext.cs


示例11: AnimationExtention_should_serialize_property_opacity_animation

        public void AnimationExtention_should_serialize_property_opacity_animation()
        {
            Effects effect = new Effects();
            effect.Container.Add(new PropertyAnimation(PropertyAnimationType.Opacity));

            _writer.Setup(w => w.Write(It.IsAny<string>())).Verifiable();

            _objectWriter.Start().Serialize("effects", effect);

            _writer.Verify(w => w.Write("effects:{list:[{name:'property',properties:['opacity']}],openDuration:200,closeDuration:200}"));
        }
开发者ID:vialpando09,项目名称:RallyPortal2,代码行数:11,代码来源:EffectsSerializationTests.cs


示例12: AnimationExtention_should_serialize_slide_animation

        public void AnimationExtention_should_serialize_slide_animation()
        {
            Effects effect = new Effects();
            effect.Container.Add(new SlideAnimation());

            _writer.Setup(w => w.Write(It.IsAny<string>())).Verifiable();

            _objectWriter.Start().Serialize("effects", effect);

            _writer.Verify(w => w.Write("effects:{list:[{name:'slide'}],openDuration:200,closeDuration:200}"));
        }
开发者ID:vialpando09,项目名称:RallyPortal2,代码行数:11,代码来源:EffectsSerializationTests.cs


示例13: Start

	void Start () 
    {
        int whatPower = Random.Range(0, itensNumber);

        switch (whatPower)
        {
            case 0: effect = Effects.SpeedPlus; this.GetComponent<SpriteRenderer>().sprite = powersSprites[0]; break;
            case 1: effect = Effects.SpeedMinus; this.GetComponent<SpriteRenderer>().sprite = powersSprites[1]; break;
            case 2: effect = Effects.AmmoPlus; this.GetComponent<SpriteRenderer>().sprite = powersSprites[2]; break;
            case 3: effect = Effects.AmmoMinus; this.GetComponent<SpriteRenderer>().sprite = powersSprites[3]; break;
        }
	}
开发者ID:SaitouRedEyes,项目名称:N.A.V.E.S,代码行数:12,代码来源:Power.cs


示例14: NextScene

    /**
     * Creates a new NextScene
     *
     * @param nextSceneId
     *            the id of the next scene
     */
    public NextScene(string nextSceneId)
    {
        this.nextSceneId = nextSceneId;

        destinyX = int.MinValue;
        destinyY = int.MinValue;
        conditions = new Conditions();
        effects = new Effects();
        postEffects = new Effects();
        transitionType = NextSceneEnumTransitionType.NO_TRANSITION;
        transitionTime = 0;
    }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:18,代码来源:NextScene.cs


示例15: Export

 public static void Export(Effects effects)
 {
     SaveFileDialog sfd = new SaveFileDialog();
     sfd.Filter = WYZTracker.Core.Properties.Resources.FXFilter;
     if (sfd.ShowDialog() == DialogResult.OK)
     {
         XmlSerializer formatter = new XmlSerializer(typeof(Effects));
         Stream objFileStream = new FileStream(sfd.FileName, FileMode.Create, FileAccess.Write, FileShare.None);
         formatter.Serialize(objFileStream, effects);
         objFileStream.Close();
     }
 }
开发者ID:AugustoRuiz,项目名称:WYZTracker,代码行数:12,代码来源:FxManager.cs


示例16: EffectHolder

    public EffectHolder(Effects effects)
    {
        this.effects = new List<EffectHolderNode> ();

        if (effects != null && effects.getEffects().Count>0) {

            EffectHolderNode e = null;
            List<Condition> conditions = new List<Condition>();
            foreach (AbstractEffect effect in effects.getEffects()) {
                if (effect == null) {

                }
                this.effects.Add(new EffectHolderNode(effect));
            }
        }
    }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:16,代码来源:EffectHolder.cs


示例17: FadeOut_FadeIn_Transition

    public void FadeOut_FadeIn_Transition(OnEndFadeIn FadeIn,OnEndFadeOut Fadeout)
    {
        CurrentEffectObj = Instantiate (EffectObj)as GameObject;
        CurrentEffectScript = CurrentEffectObj.GetComponentInChildren<Effects> ();
        CurrentEffectScript.EndFadeOutEvent += () => {
            Fadeout ();
            doFadeIn ();
        };

        CurrentEffectScript.EndFadeInEvent += () => {
            FadeIn ();
            Destroy (CurrentEffectObj);
        };

        doFadeOut ();
    }
开发者ID:MasatomoSegawa,项目名称:Life30,代码行数:16,代码来源:TransitionManager.cs


示例18: Timer

    public Timer(long time, Conditions init, Conditions end, Effects effect, Effects postEffect)
    {
        this.seconds = time;
        this.initCond = init;
        this.endCond = end;
        this.effect = effect;
        this.postEffect = postEffect;
        usesEndCondition = true;
        runsInLoop = true;
        multipleStarts = true;

        showTime = false;
        displayName = "timer";
        countDown = true;
        showWhenStopped = false;
    }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:16,代码来源:Timer.cs


示例19: Play

    public void Play(Effects effect)
    {
        GameObject go = null;
        if (effect == Effects.Attack)
            go = GameObject.Instantiate(attack, transform.position, Quaternion.identity) as GameObject;
        else if (effect == Effects.AdditionalAttack)
            go = GameObject.Instantiate(attackAdditional, transform.position, Quaternion.identity) as GameObject;
        else if (effect == Effects.BotAttack)
            go = GameObject.Instantiate(botAttack, transform.position, Quaternion.identity) as GameObject;
        else if (effect == Effects.PotionUse)
            go = GameObject.Instantiate(potion, transform.position, Quaternion.identity) as GameObject;
        else if (effect == Effects.PowerUpUse)
            go = GameObject.Instantiate(powerUp, transform.position, Quaternion.identity) as GameObject;

        go.transform.parent = this.transform;
        go.transform.localPosition = Vector3.zero;
    }
开发者ID:BlackW0lf,项目名称:source,代码行数:17,代码来源:EffectsManager.cs


示例20: CreateGrid

        /// <summary>
        /// Fill in a grid - used in terrain generation (for now) and anything that requires planar data
        /// </summary>
        /// <param name="width">Width in world units of grid</param>
        /// <param name="depth">Depth in world units of grid</param>
        /// <param name="m">Subdivisions in the x direction</param>
        /// <param name="n">Subdivisions in the z direction</param>
        /// <param name="verts">Output array of vertex positions</param>
        /// <param name="indices">Output array of index positions</param>
        public static void CreateGrid(float width, float depth, uint m, uint n, out Effects.BasicEffect.BasicEffectVertex[] verts, out uint[] indices)
        {
            var vertList = new List<Effects.BasicEffect.BasicEffectVertex>();
            var indexList = new List<uint>();

            var halfWidth = width * 0.5f;
            var halfDepth = depth * 0.5f;

            var dx = width / (n - 1);
            var dz = depth / (m - 1);

            var du = 1.0f / (n - 1);
            var dv = 1.0f / (m - 1);

            for (var i = 0; i < m; ++i)
            {
                var z = halfDepth - i * dz;
                for (var j = 0; j < n; ++j)
                {
                    var x = -halfWidth + j * dx;
                    //vertList.Add(new Vector3(x, 0.0f, z));
                    vertList.Add(new Effects.BasicEffect.BasicEffectVertex()
                    {
                        Pos = new Vector3(x, 0.0f, z),
                        TexCoord = new Vector2(j * du, i * dv)
                    });
                }
            }

            for (var i = 0u; i < m - 1; ++i)
            {
                for (var j = 0u; j < n - 1; ++j)
                {
                    indexList.Add(i * n + j);
                    indexList.Add(i * n + j + 1);
                    indexList.Add((i + 1) * n + j);

                    indexList.Add((i + 1) * n + j);
                    indexList.Add(i * n + j + 1);
                    indexList.Add((i + 1) * n + j + 1);
                }
            }

            verts = vertList.ToArray();
            indices = indexList.ToArray();
        }
开发者ID:sessamekesh,项目名称:OutsideSimulator,代码行数:55,代码来源:GeometryGenerator.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# EgoiMap类代码示例发布时间:2022-05-24
下一篇:
C# EffectType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap