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


C# EffectType类代码示例

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


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


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