本文整理汇总了C#中Motion.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Motion.ToString方法的具体用法?C# Motion.ToString怎么用?C# Motion.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Motion
的用法示例。
在下文中一共展示了Motion.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Interference
// ----------------- ---------------- ---------------- ---------------- ---------------- ---------------- //
// Progressively Manipulates The Creature Animation Transistions
void Interference (Vector2 loop, Vector2 transistion, bool rythm, Motion mute)
{
// ---------- ---------- ---------- ---------- //
// Calculates The Time ALternative For Each Respective Frame
loop = Mathematics.Framerate (framerate, loop);
transistion = Mathematics.Framerate (framerate, transistion);
// ---------- ---------- ---------- ---------- //
// Defines All Transistions For The Standardized Animations
// - Checks Whether The Animation Has Reached A 'T-Pose' Frame
if (rythm == false)
{
if (animation [name].time < loop.x || animation [name].time > loop.y + approximate)
{
foreach (float intersect in intersection)
{
if (animation [name].time > intersect && animation [name].time < intersect + approximate)
animation [name].time = loop.x;
}
}
}
// ---------- ---------- ---------- ---------- //
// Defines All Transistions For The Standardized Animations
// - Checks Whether The Animation Has Reached A 'T-Pose' Frame
if (rythm == true)
{
if (animation [name].time < loop.x || animation [name].time > loop.y + approximate)
{
foreach (float intersect in intersection)
if (animation [name].time > intersect && animation [name].time < intersect + approximate)
animation [name].time = transistion.x + approximate;
}
}
// ---------- ---------- ---------- ---------- //
// Begins The Specified Creature Animation At The Selected Timeframe
// - Loops The Specified Creature Animation If The Animation Has Run Its Course
if (hardboiled == false)
if (animation [name].time > loop.y && animation [name].time < loop.y + approximate)
{
animation [name].time = loop.x;
}
// ---------- ---------- ---------- ---------- //
// Skips Immidiately To The Selected Animation If 'Hardboiled' Remains Active
if (hardboiled == true)
if (animation [name].time < loop.x || animation [name].time > loop.y)
animation [name].time = loop.x;
// ---------- ---------- ---------- ---------- //
// Defines The Behavioural Animation Of The Creature
if (animation [name].time > loop.x && animation [name].time < loop.y)
behaviour = mute.ToString ();
// ---------- ---------- ---------- ---------- //
animation [name].speed = speed;
animation.Play (name);
}
示例2: ChangeAnimation
public void ChangeAnimation(Motion motion) {
m_currentMotion = motion;
m_anim.Play(m_currentMotion.ToString());
}
示例3: Attack
// ----------------- ---------------- ---------------- ---------------- ---------------- ---------------- //
// Progressively Manipulates The Creature Attack Animation
void Attack (Vector2 loop, Vector2 transistion, Motion mute)
{
// ---------- ---------- ---------- ---------- //
// Calculates The Time ALternative For Each Respective Frame
loop = Mathematics.Framerate (framerate, loop);
transistion = Mathematics.Framerate (framerate, transistion);
// ---------- ---------- ---------- ---------- //
// Defines The Basic Transistion For The Attack Animation
// - Checks Whether The Animation Has Reached A 'T-Pose' Frame
if (progression == false)
if (animation [name].time < transistion.x || animation [name].time > transistion.y + approximate)
{
foreach (float intersect in intersection)
{
if (animation [name].time > intersect && animation [name].time < intersect + approximate)
{
animation [name].time = transistion.x;
progression = true;
}
}
// ---------- ---------- ---------- ---------- //
if (animation [name].time > loop.x && animation [name].time < loop.y)
behaviour = mute.ToString ();
}
// ---------- ---------- ---------- ---------- //
if (progression == true)
if (animation [name].time > transistion.y && animation [name].time < transistion.y + approximate)
{
animation [name].time = loop.x;
progression = false;
}
}