-
Notifications
You must be signed in to change notification settings - Fork 0
/
NeverdawnScene.cs
47 lines (34 loc) · 906 Bytes
/
NeverdawnScene.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
40
41
42
43
44
45
46
47
using System.Collections;
using System.Collections.Generic;
using System.Xml;
using UnityEngine;
public class NeverdawnScene : MonoBehaviour {
[SerializeField]
private UIRoot uiPrefab;
[SerializeField]
private GameController gameControllerPrefab;
[SerializeField]
private NeverdawnCamera cameraPrefab;
[SerializeField]
private TextAsset events;
// Use this for initialization
void Awake () {
if (!NeverdawnCamera.exists)
{
Instantiate(cameraPrefab);
}
}
public static XmlDocument sceneEventsXml
{
get
{
NeverdawnScene scene = FindObjectOfType<NeverdawnScene>();
XmlDocument doc = new XmlDocument();
if (scene && scene.events != null)
{
doc.LoadXml(scene.events.text);
}
return doc;
}
}
}