void Awaken() { uiMan.FadeOutTitle (); CameraControl.main.m_MinSize = 12f; sequencer = gameObject.AddComponent<ResourceSequence>(); joiner = GetComponent<InputMan>(); joiner.OnStartPressed += (sender, e) => { uiMan.FadeInSequencePrompt(); sequencer.StartInput(joiner.devices[0]); uiMan.FadeOutStart(); uiMan.FadeInTimer(); }; joiner.OnStartAvailable += (sender, e) => {uiMan.FadeInStart();}; // joiner.OnStartPressed += (sender, e) => {HardCodeStart();}; joiner.OnPlayerJoined += (sender, e) => {uiMan.FadeOutText();}; sequencer.OnInputted += (sender, e) => { resourceDisplay[e.index].SetResourceIcon(ResourceType.NONE); resourceDisplay[e.index].SetFadeActive(true); }; sequencer.OnInputAgain += HandleOnInputAgain; sequencer.OnCheckInputFalse += (sender, e) => { resourceDisplay[0].GetComponentInParent<LocalPositionSpring>().velocity += new Vector3(20f, 0f, 0f); HandleOnInputAgain(sender, e);}; sequencer.OnCheckInputTrue += HandleOnInputAgain; SoundMan.main.StartTitleMusic (); }
// Use this for initialization void Start() { UnityEngine.SceneManagement.SceneManager.LoadScene("Universe", UnityEngine.SceneManagement.LoadSceneMode.Additive); resources = new Res(); tech = new Tech(); researchQueue = new ResourceSequence(this, 5); disableDeleteButton(); disableMakeButton(); disableTechButtons(); researchHistory.text = ""; researchResults.text = ""; population.text = ""; populationRate.text = ""; for (int i = 0; i < resourceTracker.Length; i++) { resourceTracker[i].text = ""; rateTracker[i].text = ""; } }