public void init(GameManager gm, Player p, WorldMap w) { this.gm = gm; this.p = p; this.w = w; state = State.Default; note = new GameObject("UI Notification").AddComponent <UINotification> (); note.init(); note.transform.parent = gm.pc.transform; hl = new GameObject("UI Highlight").AddComponent <UIHighlight> (); hl.init(this); hl.transform.parent = transform; mv = new GameObject("UI Movement").AddComponent <UIMovement> (); mv.init(this); tm = new GameObject("Tutorial Manager").AddComponent <TutorialManager>(); tm.init(); tm.transform.parent = transform; mmm = gameObject.AddComponent <MinimapManager>(); mmm.transform.parent = transform; helper = gameObject.AddComponent <HelperUI>(); helper.init(this); showHelp = false; }
public override void OnStart() { if (UserType.Host == GameData.Instance.UserType) { m_coroutine = CoroutineManager.Instance.Register(Emergency()); } else { m_UIMovement = UIManager.Instance.Open("UIMovement") as UIMovement; } Invoke("CheckActive", 1f); }
void Awake() { instance = this; }