// Use this for initialization void Start() { string[] lines = namesList.text.Split('\n'); availableNames = new List <string>(lines); checkedGuests = new List <Ghuest>(); string[] colors = colorsList.text.Split('-'); List <string> colorStrings = new List <string>(colors); foreach (string s in colorStrings) { Color c = Color.white; ColorUtility.TryParseHtmlString(s, out c); availableColors.Add(c); } int tmpIndexCheck = 0; foreach (Ghuest ch in customGuests) { ch.events = NarrativeUI.ParseAvailableEventsForGhuest(ch.mainKnot); if (ch.name == String.Empty) { ch.name = getRandomName(true); } ch.indexCheckin = tmpIndexCheck; tmpIndexCheck += UnityEngine.Random.Range(2, 4); } availablePhonecallNames = new List <string>(); MapKnotName = new Dictionary <string, string>(); triggerTimer = 50.0f; }
void Awake() { if (Instance != null) { throw new System.Exception(); } Instance = this; Storage = soup.GetComponentInChildren <FloppyArm>(); Narrative = story.GetComponent <Narrative>(); UI = ui.GetComponent <NarrativeUI>(); }
// Use this for initialization void Awake() { Cursor.visible = false; baseRoomPool = new ObjectPool<MyGameRoom> (baseRoomPrefab); floorDomePool = new ObjectPool<Transform> (floorDomePrefab); floorSpikePool = new ObjectPool<Transform> (floorSpikePrefab); ceilingOpenPool = new ObjectPool<Transform> (ceilingOpenPrefab); ceilingClosedPool = new ObjectPool<Transform> (ceilingClosedPrefab); ceilingDomePool = new ObjectPool<Transform> (ceilingOpenPrefab); ceilingSpikePool = new ObjectPool<Transform> (ceilingSpikePrefab); wallPool = new ObjectPool<Transform> (wallPrefab); doorPool = new ObjectPool<Transform> (doorPrefab); bridgePool = new ObjectPool<Transform> (bridgePrefab); portalPool = new ObjectPool<Transform> (portalPrefab); lightPool = new ObjectPool<Transform> (lightPrefab); torchPool = new ObjectPool<Transform> (torchPrefab); narrativePool = new ObjectPool<Transform> (narrativePrefab); decalPool = new List<ObjectPool<Transform>> (); rooms = new List<MyGameRoom> (); for (int i = 0; i < centerDecalPrefabs.Length; i++) { decalPool.Add (new ObjectPool<Transform> (centerDecalPrefabs[i])); } skybox = RenderSettings.skybox; if (windSound == null) { windSound = Instantiate (windSoundPrefab) as AudioSource; DontDestroyOnLoad (windSound.gameObject); } if (narrationUI == null) { narrationUI = Instantiate (narrationUIPrefab) as NarrativeUI; DontDestroyOnLoad (narrationUI.gameObject); } if (eventSys == null) { eventSys = Instantiate (eventSysPrefab) as EventSystem; DontDestroyOnLoad (eventSys.gameObject); } // DontDestroyOnLoad (this.gameObject); // DontDestroyOnLoad (windSound.gameObject); GenerateScene (); }
void Awake() { _ui = this; _inkStory = new Story(storyJSON.text); }
public Ghuest(string n, string knot) { name = n; mainKnot = knot; events = NarrativeUI.ParseAvailableEventsForGhuest(knot); }