本文整理汇总了C#中PlayMode类的典型用法代码示例。如果您正苦于以下问题:C# PlayMode类的具体用法?C# PlayMode怎么用?C# PlayMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PlayMode类属于命名空间,在下文中一共展示了PlayMode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnReset
public override void OnReset()
{
targetGameObject = null;
animationName.Value = "";
fadeLength = 0.3f;
playMode = PlayMode.StopSameLayer;
}
示例2: OnReset
public override void OnReset()
{
targetGameObject = null;
animationName.Value = "";
queue = QueueMode.CompleteOthers;
playMode = PlayMode.StopSameLayer;
}
示例3: Game
public Game(string filename, PlayMode playMode, int top, int left, int mgotop, int mgoleft)
: this(filename, playMode, mgotop, mgoleft)
{
this.top = top;
this.left = left;
this.FormBorderStyle = FormBorderStyle.None;
}
示例4: ExtensionSettings
/// <summary>
/// Constructor which gets all data
/// </summary>
/// <param name="name">Extension</param>
/// <param name="playMode">PlayMode</param>
/// <param name="arguments">Arguments</param>
/// <param name="extPlayerUse">Use in external player</param>
public ExtensionSettings(String name, PlayMode playMode, String arguments, bool extPlayerUse)
{
Name = name;
PlayMode = playMode;
Arguments = arguments;
ExtPlayerUse = extPlayerUse;
}
示例5: Play
/// <summary>
/// Will start animation with name animation. The animation will be played abruptly without any blending.<br/>
/// </summary>
/// <param name="name">The name of animation clip you want to play.</param>
/// <param name="mode">How the other animations will stopped?</param>
/// <returns>Will return false if animation can't be played (no animation clip).</returns>
/// <remarks>
/// If mode is PlayMode.StopSameLayer then all animations in the same layer will be stopped. If mode is PlayMode.StopAll then all animations currently playing will be stopped.<br/>
/// If the animation is already playing, other animations will be stopped but the animation will not rewind to the beginning.<br/>
/// If the animation is not set to be looping it will be stopped and rewinded after playing.<br/>
/// </remarks>
public bool Play(string name, PlayMode mode)
{
SpriteAnimationState state = this[name];
if (state != null)
{
//stop other state with playmode
{
if (mode == PlayMode.StopAll)
StopAllExcept(state);
else
StopLayerExcept(state.layer, state);
}
if (state.enabled)
return true;
state.lastTime = state.time = state.speed > 0 ? 0f : state.length;
state.weight = 1f;
state.enabled = true;
state.lastFrameIndex = -1;
state.lastEvaluateTime = 0;
return true;
}
return false;
}
示例6: Sample
public Sample(string name, int startFrame, int endFrame, PlayMode playMode)
{
this.name = name;
this.startTime = (startFrame - 1) / animationFPS;
this.endTime = (endFrame - 1) / animationFPS;
this.playMode = playMode;
}
示例7: Reset
public override void Reset () {
gameObject = new ConcreteGameObjectVar(this.self);
animationName = new ConcreteStringVar();
fadeLength = .3f;
queue = QueueMode.CompleteOthers;
playMode = PlayMode.StopSameLayer;
}
示例8: Play
/// <summary>
/// Will start the default animation. The animation will be played abruptly without any blending.<br/>
/// </summary>
/// <param name="mode">How the other animations will stopped?</param>
/// <returns>Will return false if animation can't be played (no default animation).</returns>
/// <remarks>
/// If mode is PlayMode.StopSameLayer then all animations in the same layer will be stopped. If mode is PlayMode.StopAll then all animations currently playing will be stopped.<br/>
/// If the animation is already playing, other animations will be stopped but the animation will not rewind to the beginning.<br/>
/// If the animation is not set to be looping it will be stopped and rewinded after playing.<br/>
/// </remarks>
public bool Play(PlayMode mode)
{
if ( clip == null )
return false;
return Play(clip.name, mode);
}
示例9: OnReset
public override void OnReset()
{
if (animationName != null) {
animationName.Value = "";
}
playMode = PlayMode.StopSameLayer;
}
示例10: World
// new world with the editor
private World(PlayMode playMode)
{
this.PlayMode = playMode;
this.viewport = new GamePoint(0, 0);
if (playMode == PlayMode.Editor)
mainGameObject = new NullMGO();
}
示例11: OnReset
public override void OnReset()
{
if (animationName != null) {
animationName.Value = "";
}
queue = QueueMode.CompleteOthers;
playMode = PlayMode.StopSameLayer;
}
示例12: Reset
public override void Reset()
{
gameObject = null;
animName = null;
playMode = PlayMode.StopAll;
blendTime = 0.3f;
finishEvent = null;
stopOnExit = false;
}
示例13: Close_Click
private void Close_Click(object sender, RoutedEventArgs e)
{
Mode = (PlayMode)ModeBox.SelectedItem;
if (isNameChanged)
MyName = NameTb.Text;
else MyName = "WinDev";
DialogResult = true;
this.Close();
}
示例14: GetRuleset
public static Ruleset GetRuleset(PlayMode mode)
{
Type type;
if (!availableRulesets.TryGetValue(mode, out type))
return null;
return Activator.CreateInstance(type) as Ruleset;
}
示例15: getModeIcon
private FontAwesome getModeIcon(PlayMode mode)
{
switch (mode)
{
default: return FontAwesome.fa_osu_osu_o;
case PlayMode.Taiko: return FontAwesome.fa_osu_taiko_o;
case PlayMode.Catch: return FontAwesome.fa_osu_fruits_o;
case PlayMode.Mania: return FontAwesome.fa_osu_mania_o;
}
}