-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEndScene.cs
39 lines (34 loc) · 960 Bytes
/
EndScene.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using System.Collections.Generic;
using System.Linq;
using BlackCoat;
using BlackCoat.Entities;
using SFML.System;
namespace DreamAwake
{
class EndScene : Scene
{
public EndScene(Core core) : base(core, "WinScreen", "Assets")
{ }
protected override bool Load()
{
var tex = TextureLoader.Load("WinBG");
Layer_Game.Add(new Graphic(_Core, tex)
{
Origin = tex.Size.ToVector2f() / 2,
Scale = new Vector2f(4, 4)
});
_Core.DeviceResized += HandleDeviceResized;
HandleDeviceResized(_Core.DeviceSize);
return true;
}
private void HandleDeviceResized(Vector2f size)
{
Layer_Game.GetFirst<Graphic>().Position = size / 2;
}
protected override void Update(float deltaT)
{ }
protected override void Destroy()
{ }
}
}