From f966bf235c1015ccfb41ad332203c03d9df5a7cc Mon Sep 17 00:00:00 2001 From: Sophie Date: Sat, 9 Apr 2016 16:33:57 -0400 Subject: [PATCH] WorldManager singelton --- Assets/Scripts/WorldManager.cs | 25 +++++++++++++++++++++++++ Assets/Scripts/WorldManager.cs.meta | 12 ++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 Assets/Scripts/WorldManager.cs create mode 100644 Assets/Scripts/WorldManager.cs.meta diff --git a/Assets/Scripts/WorldManager.cs b/Assets/Scripts/WorldManager.cs new file mode 100644 index 0000000..ba1ecdc --- /dev/null +++ b/Assets/Scripts/WorldManager.cs @@ -0,0 +1,25 @@ +using UnityEngine; +using System.Collections; + +public class WorldManager : MonoBehaviour { + + private static WorldManager instance = null; + private WorldManager(){} + + // Use this for initialization + public void Awake () { + if (!instance) + { + instance = new WorldManager(); + } + } + + public WorldManager getInstance() { + return instance; + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/Scripts/WorldManager.cs.meta b/Assets/Scripts/WorldManager.cs.meta new file mode 100644 index 0000000..81bb7ca --- /dev/null +++ b/Assets/Scripts/WorldManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3eaea4cf17643ba42939e209672bc39e +timeCreated: 1460233556 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: