本文整理汇总了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;
}
示例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");
}
}
示例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");
}
}
示例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);
}
示例5: ReadPacket
public void ReadPacket(IMinecraftStream stream)
{
Effect = (EffectType)stream.ReadInt32();
X = stream.ReadInt32();
Y = stream.ReadInt8();
Z = stream.ReadInt32();
Data = stream.ReadInt32();
}
示例6: Effect
public Effect(Characteristic target, int amount, EffectType type, int duration, DurationType durType)
{
Target = target;
Amount = amount;
Type = type;
Duration = duration;
DurType = durType;
}
示例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;
}
示例8: AddStatusEffect
public void AddStatusEffect(EffectType type)
{
StatusEffect effect = GetEffectFromEnum(type);
if (effect == null)
return;
if(type == EffectType.HIT)
ResetEffects();
AddStatusEffect(effect);
}
示例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());
}
示例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;
}
示例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;
}
}
}
示例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;
}
示例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;
}
示例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 );
}
示例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);
}
}