Beispiel #1
0
        public static void Run()
        {
            if (slates.Count <= 0)
            {
                return;
            }
            List <string> assets = new List <string>(0);

            foreach (string slateUUID in slates)
            {
                SlateState state = fsm.FindState(slateUUID) as SlateState;
                foreach (Slate.Asset asset in state.slate.assets.Values)
                {
                    string assetID = asset.package + "@" + asset.file;
                    if (assets.Contains(assetID))
                    {
                        continue;
                    }
                    assets.Add(assetID);
                }
            }
            Log.Debug("SlateMgr", "ready load {0} assets", assets.Count);
            preloadAssets(assets, () =>
            {
                Log.Debug("SlateMgr", "ready run slate");
                SlateState firstSlate = fsm.FindState(slates[0]) as SlateState;
                fsm.SwitchState(firstSlate);
            });
        }
Beispiel #2
0
 public static string AliasToUUID(string _alias)
 {
     foreach (string slateUUID in slates)
     {
         State state = fsm.FindState(slateUUID);
         if (null == state)
         {
             continue;
         }
         SlateState slateState = state as SlateState;
         if (slateState.slate.alias.Equals(_alias))
         {
             return(slateUUID);
         }
     }
     return("");
 }