本文整理汇总了C#中TransitionType类的典型用法代码示例。如果您正苦于以下问题:C# TransitionType类的具体用法?C# TransitionType怎么用?C# TransitionType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TransitionType类属于命名空间,在下文中一共展示了TransitionType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Transition
public Transition(string name, long unid, bool showAnnotation, int priority, TransitionType transitionType, int delay)
: base(name, unid, showAnnotation)
{
this.priority = priority;
this.transitionType = transitionType;
this.delay = delay;
}
示例2: FloatingMessage
public FloatingMessage(String text, TransitionType transition = TransitionType.FIXED, Actor attachedMonster = null)
{
this.text = text;
this.attachedMonster = attachedMonster;
this.dialogSprite = new SpriteBatch(UI.getInstance().graphics);
this.transitionType = transition;
}
示例3: BackgroundScreen
/// <summary>
/// Constructs a new background screen.
/// </summary>
public BackgroundScreen(string filename, TransitionType trans)
{
TransitionOnTime = TimeSpan.FromSeconds(0.5);
TransitionOffTime = TimeSpan.FromSeconds(0.5);
this.filename = filename;
transitionType = trans;
}
示例4: ChangeScene
public static void ChangeScene(string sceneName, TransitionType type)
{
if(sceneName.Length == 0){
Debug.Log("SceneName is Null");
return;
}
if (_nextSceneName.Length > 0){
Debug.Log("Current Loading some other scene");
return;
}
//ロード中
if (_asyncOpp != null && !_asyncOpp.isDone){
return;
}
string curScene = Application.loadedLevelName; //_nextSeqName;
_lastSceneName = curScene;
_nextSceneName = sceneName;
if (type == TransitionType.None)
{
SceneManager.LoadNextLevelCore();
}
else
{
_transitionFlag = false;
// Commence Transition Effects
// _loadingTransition.ShowTransition(type, () => {
// SceneManager.LoadNextLevel();
// });
}
}
示例5: PopUpGraphicScreen
public PopUpGraphicScreen(Texture2D _graphic, Vector2 _positionOffset, TransitionType _ttype, TimeSpan _transitionTime)
{
graphic = _graphic;
ttype = _ttype;
TransitionOnTime = _transitionTime;
TransitionOffTime = _transitionTime;
positionOffset = _positionOffset;
position = Camera.Origin - new Vector2(graphic.Width * 0.5f, graphic.Height * 0.5f) + positionOffset;
}
示例6: FillList
private void FillList(ListBox list, TransitionType selection)
{
for (int i = 0; i < (int)TransitionType.EaseOutInBounce; i++) {
list.Items.Add((TransitionType)i);
if ((TransitionType)i == selection) {
list.SelectedIndex = i;
}
}
}
示例7: TransitioningImage
/// <summary>
///
/// </summary>
/// <param name="first"></param>
/// <param name="second"></param>
/// <param name="type">Linear interpolation or cosine</param>
/// <param name="frames">Number of frames until the picture completely changes to the second one, then goes back to the first one</param>
public TransitioningImage(Texture first, Texture second, TransitionType type, int frames, bool animateFirstAlpha = true)
{
First = new TexturedRectangle(first);
Second = new TexturedRectangle(second);
Type = type;
Frames = frames;
AnimateFirstImageAlpha = animateFirstAlpha;
AddChild(First);
AddChild(Second);
}
示例8: TransitionEffect
public TransitionEffect(Vector2 center,TransitionType type)
{
this.scale = 1;
if (type == TransitionType.Translate)
this.translation = new Vector2(-500, 0);
else
translation = Vector2.Zero;
this.center = center;
this.type = type;
alpha = 1;
}
示例9: StartTransition
public void StartTransition (Color fromColor, Color toColor, float duration, TransitionType type) {
if (transitState == TransitionState.TransitedIn || transitState == TransitionState.TransitedOut) {
// Change the state to transiting in/out (according to the previous state)
transitState = transitState == TransitionState.TransitedIn ? TransitionState.TransitingOut : TransitionState.TransitingIn;
// Enable the transiter's Image
transiters[type].EnableImage ();
// Call the transition animation according to the given TransitionType
transiters[type].StartTransition (fromColor, toColor, duration);
}
}
示例10: NavigationEntry
/// <summary>
/// NavigationEntry
/// </summary>
/// <param name="completionTime">completionTime</param>
/// <param name="displayUrl">displayUrl</param>
/// <param name="httpStatusCode">httpStatusCode</param>
/// <param name="originalUrl">originalUrl</param>
/// <param name="title">title</param>
/// <param name="transitionType">transitionType</param>
/// <param name="url">url</param>
/// <param name="hasPostData">hasPostData</param>
/// <param name="isValid">isValid</param>
/// <param name="isCurrent">is the current entry</param>
public NavigationEntry(bool isCurrent, DateTime completionTime, string displayUrl, int httpStatusCode, string originalUrl, string title, TransitionType transitionType, string url, bool hasPostData, bool isValid)
{
this.isCurrent = isCurrent;
this.completionTime = completionTime;
this.displayUrl = displayUrl;
this.httpStatusCode = httpStatusCode;
this.originalUrl = originalUrl;
this.title = title;
this.transitionType = transitionType;
this.url = url;
this.hasPostData = hasPostData;
this.isValid = isValid;
}
示例11: StateMenu
public StateMenu(LeGame g)
: base(g)
{
Log("Creating state");
background = new ScrollBackground(game, "menu/background");
mouse = new MouseEntity(game);
singleColor = multiColor = optionsColor = exitColor = TEXT_COLOR;
isTransitioning = true;
doChangeState = false;
transitionCount = 0;
targetState = StateManager.State.Single;
currentTransition = TransitionType.FadeIn;
}
示例12: Start
protected void Start(Control control, TransitionType transitionType, int duration, AnimationAction actionHandler, AnimationFinishedEvaluator evaluatorHandler)
{
this.targetControl = control;
this.transitionType = transitionType;
this.actionHandler = actionHandler;
this.evaluatorHandler = evaluatorHandler;
this.counter = 0;
this.startTime = 0;
this.targetTime = duration;
timer = DelayedCall.Start(DoAnimation, duration);
}
示例13: ActivateView
/// <summary>
/// Show view onto the screen
/// </summary>
/// <param name="view">View to activate</param>
/// <param name="type">Type of a transition</param>
public static void ActivateView(IView view, TransitionType type)
{
if (_masterForm.InvokeRequired)
{
_masterForm.Invoke(new Action<IView>(ActivateView), new object[] { view, type });
return;
}
var from = _currentView != null ? _currentView : view;
var to = view;
AddViewToForm(to);
ViewTransitionManager.Execute(from, to, type);
}
示例14: Start
/// <summary>
/// Starts the specified control.
/// </summary>
/// <param name="control">The control.</param>
/// <param name="targetSize">Size of the target.</param>
/// <param name="transitionType">Type of the transition.</param>
/// <param name="duration">The duration.</param>
public void Start(Control control, Size targetSize, TransitionType transitionType, int duration)
{
base.Start(control, transitionType, duration,
delegate
{
int width = DoExpandAnimation(control.Width, targetSize.Width);
int height = DoExpandAnimation(control.Height, targetSize.Height);
control.Size = new Size(width, height);
},
delegate
{
return (control.Size.Equals(targetSize));
});
}
示例15: Start
public void Start(Control control, Point targetPoint, TransitionType transitionType, int duration)
{
base.Start(control, transitionType, duration,
delegate
{
int x = DoMoveAnimation(control.Location.X, targetPoint.X);
int y = DoMoveAnimation(control.Location.Y, targetPoint.Y);
control.Location = new Point(x, y);
},
delegate
{
return (control.Location.Equals(targetPoint));
});
}