2018-06-19 09:06:54 +00:00
|
|
|
// Copyright (c) Xenko contributors (https://xenko.com) 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;
|
2019-12-14 10:02:36 +00:00
|
|
|
using Xenko.Core.Serialization;
|
2018-06-19 09:06:54 +00:00
|
|
|
using Xenko.Engine;
|
|
|
|
|
using Xenko.Input;
|
|
|
|
|
|
|
|
|
|
namespace GameMenu
|
|
|
|
|
{
|
|
|
|
|
public class SplashScript : UISceneBase
|
|
|
|
|
{
|
2019-12-14 10:02:36 +00:00
|
|
|
public UrlReference<Scene> NextSceneUrl { get; set; }
|
|
|
|
|
|
2018-06-19 09:06:54 +00:00
|
|
|
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
|
2019-12-14 10:02:36 +00:00
|
|
|
SceneSystem.SceneInstance.RootScene = Content.Load(NextSceneUrl);
|
2018-06-19 09:06:54 +00:00
|
|
|
Cancel();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|