mirror of
https://github.com/stride3d/stride
synced 2026-05-24 10:19:21 +00:00
30 lines
1,001 B
C#
30 lines
1,001 B
C#
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
|
|
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
|
|
using System.Linq;
|
|
using Stride.Core.Serialization;
|
|
using Stride.Engine;
|
|
using Stride.Input;
|
|
|
|
namespace GameMenu
|
|
{
|
|
public class SplashScript : UISceneBase
|
|
{
|
|
public UrlReference<Scene> NextSceneUrl { get; set; }
|
|
|
|
protected override void LoadScene()
|
|
{
|
|
// Allow user to resize the window with the mouse.
|
|
Game.Window.AllowUserResizing = true;
|
|
}
|
|
|
|
protected override void UpdateScene()
|
|
{
|
|
if (Input.PointerEvents.Any(e => e.EventType == PointerEventType.Pressed))
|
|
{
|
|
// Next scene
|
|
SceneSystem.SceneInstance.RootScene = Content.Load(NextSceneUrl);
|
|
Cancel();
|
|
}
|
|
}
|
|
}
|
|
}
|