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

C# EffectType类代码示例

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

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



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

示例1: Ongoing

 public Ongoing(Keyword keyword, EffectType effect_type, int modifier, int duration)
 {
     key = keyword;
     type = effect_type;
     mod = modifier;
     dur = duration;
 }
开发者ID:emotecontrol,项目名称:CSharpCombatTracker,代码行数:7,代码来源:Ongoing.cs


示例2: CreateEffectDefinitionAsync

        internal static async Task<IVideoEffectDefinition> CreateEffectDefinitionAsync(EffectType effectType)
        {
            switch (effectType)
            {
                case EffectType.Lumia:
                    return new LumiaEffectDefinition(() =>
                    {
                        return new IFilter[]
                    {
                        new AntiqueFilter(),
                        new FlipFilter(FlipMode.Horizontal)
                    };
                    });

                case EffectType.ShaderNv12:
                    IBuffer shaderY = await PathIO.ReadBufferAsync("ms-appx:///Invert_093_NV12_Y.cso");
                    IBuffer shaderUV = await PathIO.ReadBufferAsync("ms-appx:///Invert_093_NV12_UV.cso");
                    return new ShaderEffectDefinitionNv12(shaderY, shaderUV);

                case EffectType.ShaderBgrx8:
                    IBuffer shader = await PathIO.ReadBufferAsync("ms-appx:///Invert_093_RGB32.cso");
                    return new ShaderEffectDefinitionBgrx8(shader);

                default:
                    throw new ArgumentException("Invalid effect type");
            }
        }
开发者ID:gtarbell,项目名称:VideoEffect,代码行数:27,代码来源:Utils.cs


示例3: CalculateHealth

	//Should be changed to calculate life, this function would then be used for all cases in which health pools are changed
	public void CalculateHealth(GameObject aCause, float aValue, EffectType aHealthEffect = EffectType.loss) //GameObject dealing damage, Damage, DamageType
	{
		try
		{
			switch (aHealthEffect)
			{
				case EffectType.loss:
					if (m_Pools.Health > 0)
					{
						m_Pools.Health -= aValue;
						m_Actor.m_HUD.UpdatePools();
					}
					break;
				case EffectType.gain:
					m_Pools.Health += aValue;
					m_Actor.m_HUD.UpdatePools();
					break;
			}

			if (m_Pools.Health > 0)
			{
				return;
			}

			m_Pools.Health = 0;
			m_Actor.m_HUD.DisplayGameOver();
		}
		catch
		{
			Debug.Log(m_Actor.name + " Statistics HUD reference is NULL");
		}
	}
开发者ID:WEASEL4994,项目名称:UnityFramework,代码行数:33,代码来源:ActorStatistics.cs


示例4: Read

 public override void Read(PacketReader r)
 {
     EffectType = (EffectType)r.ReadByte();
     TargetId = r.ReadInt32();
     PosA =(Location) new Location().Read(r);
     PosB = (Location) new Location().Read(r);
     Color = ARGB.Read(r);
 }
开发者ID:Zeroeh,项目名称:K_Relay,代码行数:8,代码来源:ShowEffectPacket.cs


示例5: ReadPacket

 public void ReadPacket(IMinecraftStream stream)
 {
     Effect = (EffectType)stream.ReadInt32();
     X = stream.ReadInt32();
     Y = stream.ReadInt8();
     Z = stream.ReadInt32();
     Data = stream.ReadInt32();
 }
开发者ID:Zoxive,项目名称:TrueCraft,代码行数:8,代码来源:SoundEffectPacket.cs


示例6: Effect

 public Effect(Characteristic target, int amount, EffectType type, int duration, DurationType durType)
 {
     Target = target;
     Amount = amount;
     Type = type;
     Duration = duration;
     DurType = durType;
 }
开发者ID:Sonorh,项目名称:RaccoonKnightTwg,代码行数:8,代码来源:Effect.cs


示例7: StatEffect

 // --- Constructors ---
 public StatEffect(EffectType pmType, string pmName, string pmDesc, StatEffectEvent pmEffectEvent, int pmTurnsLeft)
 {
     type=	pmType;
     name=	pmName;
     desc=	pmDesc;
     effectEvent=	pmEffectEvent;
     turnsLeft=	pmTurnsLeft;
 }
开发者ID:pgonzbecer,项目名称:Conquest,代码行数:9,代码来源:StatEffect.cs


示例8: AddStatusEffect

 public void AddStatusEffect(EffectType type)
 {
     StatusEffect effect = GetEffectFromEnum(type);
     if (effect == null)
         return;
     if(type == EffectType.HIT)
         ResetEffects();
     AddStatusEffect(effect);
 }
开发者ID:zeropointx,项目名称:KartClone,代码行数:9,代码来源:StatusEffectHandler.cs


示例9: Avatars_OnEffect

 private void Avatars_OnEffect(EffectType type, LLUUID sourceID, LLUUID targetID, 
     LLVector3d targetPos, float duration, LLUUID id)
 {
     if (ShowEffects)
         Console.WriteLine(
         "ViewerEffect [{0}]: SourceID: {1} TargetID: {2} TargetPos: {3} Duration: {4} ID: {5}",
         type, sourceID.ToString(), targetID.ToString(), targetPos, duration,
         id.ToString());
 }
开发者ID:chrbayer84,项目名称:SLAgentCSServer,代码行数:9,代码来源:ShowEffectsCommand.cs


示例10: FindAhead

		//----------------------------------------------------------------------
		//  Here, we are going to search the quadrant that it is ahead of the player, because
		//  he is running
		//----------------------------------------------------------------------
		public static bool FindAhead(
			PlayerMobile pm,
			Point3D centerPoint,
			ref Point3D spawnPoint,
			LandType landType,
			int distance,
			EffectType effectType,
			int effectHue
			)
		{
			Direction dir = (Direction)((int)pm.Direction & 0x0f);

			Point3D foundPoint = new Point3D();

			Tour tour = delegate( Map map, int x, int y )
			{
				if( Utility.RandomDouble() < .5 ) return false; // break it up a little.

				Point2D currentPoint = new Point2D( pm.Location.X + x, pm.Location.Y + y );

				if( FindSpawnTileInternal(
						pm,
						centerPoint,
						currentPoint,
						ref foundPoint,
						landType,
						effectType,
						effectHue
						)
					)
				{
					return true;
				}

				return false;
			};

			bool found = Search.Octant(
				pm.Map,
				dir,
				distance,
				SearchDirection.Inwards,
				tour
				);

			if( found )
			{
				spawnPoint.X = foundPoint.X;
				spawnPoint.Y = foundPoint.Y;
				spawnPoint.Z = foundPoint.Z;

				return true;
			}

			return false;
		}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:60,代码来源:SpawnFinder.cs


示例11: addEffect

 public void addEffect(EffectType pType, Vector2 pOrigin, float pAngle)
 {
     for (int i = 0; i < MAX_EFFECTS; i++)
     {
         if (!mAllEffects[i].isAlive())
         {
             mAllEffects[i].initialize(pType, pOrigin, ref mParticles, pAngle);
             break;
         }
     }
 }
开发者ID:JackOfDawn,项目名称:GraphicsFinal,代码行数:11,代码来源:ParticleManager.cs


示例12: SpriteEffect

 /// <summary>
 /// Basiskonstruktor.
 /// </summary>
 public SpriteEffect()
 {
     elapsedTime = 0;
     CurrentSprite = Vector2.Zero;
     Size = Vector2.Zero;
     SheetSize = Vector2.Zero;
     Offset = 0;
     ChangeSpeed = 0.0f;
     CicleDirection = SpriteCicleDirection.Left;
     SpriteType = EffectType.None;
 }
开发者ID:satkowski,项目名称:MonoGame_NoNameGame,代码行数:14,代码来源:SpriteEffect.cs


示例13: Effect

        /// <summary>
        /// Creates a new instance of Effect
        /// </summary>
        /// <param name="aDuration">The duration of the effect</param>
        public Effect(EffectType aEffectType, int aMagnitude, int aDuration = 1)
        {
            // Set the effect type.
            EffectType = aEffectType;

            // Set the duration of this effect.
            Duration = aDuration;

            // Set the magnitude of this effect.
            Magnitude = aMagnitude;
        }
开发者ID:exallium,项目名称:DotNetHack,代码行数:15,代码来源:Effect.cs


示例14: FindOutwards

		//----------------------------------------------------------------------
		//  Opposite of the above; we want the first spawn location closest to
		//  the center -- no closer than the initial distance
		//----------------------------------------------------------------------
		public static bool FindOutwards(
			PlayerMobile pm,
			Point3D centerPoint,
			ref Point3D spawnPoint,
			LandType landType,
			int distance,
			EffectType effectType,
			int effectHue
			)
		{
			return FindSpiral( pm, centerPoint, ref spawnPoint, landType, distance, false, effectType, effectHue );
		}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:16,代码来源:SpawnFinder.cs


示例15: GetEffectInfo

		public IList<IEffectSpriteInfo> GetEffectInfo(EffectType effectType, int effectID)
		{
			switch (effectType)
			{
				case EffectType.Potion: return ResolvePotionEffect((HardCodedPotionEffect)effectID);
				case EffectType.Spell: return ResolveSpellEffect((HardCodedSpellGraphic)effectID);
				case EffectType.WarpOriginal:
				case EffectType.WarpDestination: return GetWarpEffect(effectType);
				case EffectType.WaterSplashies: return GetWaterEffect();
				default: throw new ArgumentOutOfRangeException("effectType", effectType, null);
			}
		}
开发者ID:Fallenoath,项目名称:EndlessClient,代码行数:12,代码来源:EffectSpriteManager.cs


示例16: SendAffectMessage

    //
    //-- Send Message Calls
    //     This section is for the MESSAGES such as the ones described in the
    //     test instructions.
    //

    public static bool SendAffectMessage( InstanceID recipient, EffectType type, int intensity, double time = -1.0d )
    {
        Entity targetEntity = null;

        if( s_GameEntities.TryGetValue( target, out targetEntity ) )
        {
            targetEntity.Affect( type, intensity );
            return true;
        }

        return false;
    }
开发者ID:ericdalrymple,项目名称:HotSpot,代码行数:18,代码来源:GameSystem.cs


示例17: GetSoundEffectsForEffect

		public IList<SoundEffectInstance> GetSoundEffectsForEffect(EffectType type, int id)
		{
			switch (type)
			{
				case EffectType.Potion: return GetPotionSoundEffect(id);
				case EffectType.Spell: return GetSpellSoundEffect(id);
				case EffectType.WarpOriginal:
				case EffectType.WarpDestination: return GetWarpSoundEffect(type);
				case EffectType.WaterSplashies: return GetWaterSoundEffect();
				default: throw new ArgumentOutOfRangeException("type", type, null);
			}
		}
开发者ID:Fallenoath,项目名称:EndlessClient,代码行数:12,代码来源:EffectSoundManager.cs


示例18: EffectAudio

		internal EffectAudio(EffectType eType)
            : base(eType)
        {
			try
			{
				aChannels = null; //комментарии в IAudio
			}
			catch
			{
				Fail();
				throw;
			}
		}
开发者ID:ratsil,项目名称:bethe.btl,代码行数:13,代码来源:EffectAudio.cs


示例19: Magic

 /// <summary>
 /// Primary constructor for Magic class. For single-effect spells.
 /// </summary>
 /// <param name="name">Name of the Spell.</param>
 /// <param name="cost">Cost of the Spell</param>
 /// <param name="description">Detailed Description of the Spell. Should not include Flavor Text.</param>
 /// <param name="potency">Numerical modifier for primary effect of spell.</param>
 /// <param name="accuracy">Base accuracy of the spell.</param>
 /// <param name="spellmagicschooltype">School of magic the spell falls under.</param>
 /// <param name="spellelementtype">Elemental effect of the spell.</param>
 /// <param name="spelleffecttype">Main effect type of the spell.</param>
 public Magic(string name = "", int cost = 0, string description = "", int potency = 0, double accuracy = 0,
     MagicSchoolType spellmagicschooltype = MagicSchoolType.Black, ElementType spellelementtype = ElementType.Light,
     EffectType spelleffecttype = EffectType.Damage)
 {
     Name = name;
     Cost = cost;
     Description = description;
     Potency = potency;
     Accuracy = accuracy;
     SpellMagicSchoolType = spellmagicschooltype;
     SpellElementType = spellelementtype;
     SkillEffectType = spelleffecttype;
 }
开发者ID:Zamazi,项目名称:FFTRPG,代码行数:24,代码来源:SkillClassDefinition.cs


示例20: CS_WP_MT_Basic

        async Task CS_WP_MT_Basic(EffectType effectType)
        {
            StorageFile source = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Input/Car.mp4"));
            StorageFile destination = await KnownFolders.VideosLibrary.CreateFileAsync("CS_WP_MT_Basic" + effectType + ".mp4", CreationCollisionOption.ReplaceExisting);

            var definition = await Utils.CreateEffectDefinitionAsync(effectType);

            var transcoder = new MediaTranscoder();
            transcoder.AddVideoEffect(definition.ActivatableClassId, true, definition.Properties);

            PrepareTranscodeResult transcode = await transcoder.PrepareFileTranscodeAsync(source, destination, MediaEncodingProfile.CreateMp4(VideoEncodingQuality.Qvga));
            await transcode.TranscodeAsync();
        }
开发者ID:gtarbell,项目名称:VideoEffect,代码行数:13,代码来源:MediaTranscoderTests.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Effects类代码示例发布时间:2022-05-24
下一篇:
C# EffectTechnique类代码示例发布时间: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