Exemplo n.º 1
0
        public static void Init()
        {
            ToastManager.Init();

            hints = new List <BaseHint>();

            //
            // Add all the hints here
            //
            hints.Add(new ResourceMeterHint());
            hints.Add(new FullResourceHint());
            hints.Add(new NoControllerHint());
            hints.Add(new QuietMainMenuHint());
            hints.Add(new WaterTerrainHint());
            hints.Add(new WaterNoTerrainHint());
            hints.Add(new GamepadNoFilterHint());
            hints.Add(new SwitchNoTargetHint());
            hints.Add(new NoTerrainToRaiseHint());
#if !NETFX_CORE
            hints.Add(new MicrobitNeedsResetHint());
#endif

            // Disable hints that the user has previously dismissed.
            // Yes this is n^2 but the lists should be short enough
            // so you'll never notice.
            List <string> disList = XmlOptionsData.DisabledHintIDs;
            if (disList != null)
            {
                for (int i = 0; i < disList.Count; i++)
                {
                    for (int j = 0; j < hints.Count; j++)
                    {
                        if (disList[i] == hints[j].ID)
                        {
                            hints[j].Disabled = true;
                        }
                    }
                }
            }
        }   // end of Init()
Exemplo n.º 2
0
 /// <summary>
 /// 新增彈跳視窗模組。
 /// </summary>
 public void AddToastManager()
 {
     toastManager = gameObject.AddComponent <ToastManager>();
     toastManager.Init();
 }