本文整理汇总了C#中EffectType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# EffectType.ToString方法的具体用法?C# EffectType.ToString怎么用?C# EffectType.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EffectType
的用法示例。
在下文中一共展示了EffectType.ToString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TypeString
internal static string TypeString(EffectType e)
{
if(e == EffectType.None)
return null;
if(e == EffectType.SlideDown)
return "slideDown";
else if(e == EffectType.FadeIn)
return "fadeIn";
else
return e.ToString().ToLower();
}
示例2: HitEffectObstacle
public void HitEffectObstacle(float value, EffectType type)
{
Debug.Log ("Effect " + value.ToString()+ " " + type.ToString());
}
示例3: SetScripts
internal static void SetScripts(Page p, EffectType e)
{
if(e != EffectType.Show && e != EffectType.SlideDown && e != EffectType.FadeIn)
Script.AddResourceScript(p, "jquery.effects." + e.ToString().ToLower() + ".js");
}
示例4: Transition
public void Transition(ref System.Windows.Forms.Panel current, ref System.Windows.Forms.Panel next, EffectType type)
{
BitmapSource currentBitmapSource = null;
BitmapSource nextBitmapSource = null;
ImageBrush currentImage = null;
ImageBrush nextImage = null;
WEPDefaultEffect effect = null;
try
{
// 現在のPanelの画像を取得
currentBitmapSource = GetBitmapSource(current, false);
// 次に表示するPanleの画像を取得
string nextBitmapPath = next.Name + ".bmp";
if (System.IO.File.Exists(nextBitmapPath))
{
System.Drawing.Imaging.BitmapData bitmapData = null;
Bitmap nextBitmap = null;
try
{
nextBitmap = new Bitmap(nextBitmapPath);
bitmapData = nextBitmap.LockBits(
new System.Drawing.Rectangle(0, 0, nextBitmap.Width, nextBitmap.Height),
System.Drawing.Imaging.ImageLockMode.ReadOnly,
System.Drawing.Imaging.PixelFormat.Format32bppArgb);
nextBitmapSource = BitmapSource.Create(
nextBitmap.Width, nextBitmap.Height, 96, 96, PixelFormats.Bgra32, null,
bitmapData.Scan0, nextBitmap.Width * nextBitmap.Height * 4, bitmapData.Stride);
}
catch (SystemException ex)
{
Console.WriteLine(ex.Message);
}
finally
{
if (bitmapData != null)
{
nextBitmap.UnlockBits(bitmapData);
}
}
}
else
{
nextBitmapSource = GetBitmapSource(next, true); // 初回のみ
}
if (type == EffectType.Random)
{
type = (EffectType)random.Next(effectList.Count);
}
if (type == EffectType.None)
{
effect = new WEPDefaultEffect();
}
else
{
effect = effectList[(int)type] as WEPDefaultEffect;
}
Console.WriteLine(type.ToString());
currentImage = new ImageBrush(currentBitmapSource);
nextImage = new ImageBrush(nextBitmapSource);
canvas.Width = current.Width;
canvas.Height = current.Height;
Console.WriteLine(canvas.Width.ToString() + " " + canvas.Height.ToString());
//this.Visibility = Visibility.Visible; // effectスタート
current.Visible = false;
effect.DrawEffectImage(currentImage, nextImage, ref next, ref canvas);
//this.Visibility = Visibility.Hidden; // effect終わり
}
catch (SystemException ex)
{
Console.WriteLine(ex.Message);
}
}
示例5: NumEffects
/// <summary>
/// The number of effects. (Beneficial, Detrimental, All)
/// </summary>
/// <param name="type">type</param>
public int NumEffects(EffectType type = EffectType.All)
{
Trace.WriteLine(String.Format("Character:NumEffects({0})", type));
switch (type)
{
case EffectType.Beneficial:
case EffectType.Detrimental:
return this.GetIntFromLSO("NumEffects", type.ToString());
default:
return this.GetIntFromLSO("NumEffects");
}
}
示例6: Effect
/// <summary>
/// Retrieves the effect of the given type at the specified index. (Beneficial, Detrimental, All(
/// </summary>
/// <param name="type">type</param>
/// <param name="name">name</param>
public Effect Effect(string name, EffectType type = EffectType.All)
{
Trace.WriteLine(String.Format("Character:CountEffects({0}, {1})", type, name));
switch (type)
{
case EffectType.Beneficial:
case EffectType.Detrimental:
return new Effect(this.GetMember("Effect", type.ToString(), name));
default:
return new Effect(this.GetMember("Effect", name));
}
}