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


C# Motion.ToString方法代码示例

本文整理汇总了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);
	
	
	}
开发者ID:braedenf,项目名称:TheMicroGameProject,代码行数:68,代码来源:AntAnimation.cs

示例2: ChangeAnimation

 public void ChangeAnimation(Motion motion) {
     m_currentMotion = motion;
     m_anim.Play(m_currentMotion.ToString());
 }
开发者ID:fotoco,项目名称:006772,代码行数:4,代码来源:Player.cs

示例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;
    }
	
	}
开发者ID:braedenf,项目名称:TheMicroGameProject,代码行数:42,代码来源:AntAnimation.cs


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