예제 #1
0
 static public void assignGlobalData(LuaSaveCollection lsc, NLua.LuaTable data)
 {
     if (!lsc.data.Contains(data))
     {
         lsc.data.Add(data);
     }
 }
예제 #2
0
        static public LuaSaveCollection getGlobalData(String Name, String typeName)
        {
            LuaSaveCollection temp = globalSaveCollection.Find(sd => sd.name.Equals(Name, StringComparison.OrdinalIgnoreCase) && sd.dataName.Equals(typeName, StringComparison.OrdinalIgnoreCase));

            if (temp == null)
            {
                temp = new LuaSaveCollection();
            }
            return(temp);
        }
예제 #3
0
        static public LuaSaveCollection CreateGlobalSave(String name, String typeName)
        {
            LuaSaveCollection temp = globalSaveCollection.Find(sc => sc.dataName.Equals(typeName, StringComparison.OrdinalIgnoreCase) && sc.name.Equals(name, StringComparison.OrdinalIgnoreCase));

            if (temp == default(LuaSaveCollection))
            {
                globalSaveCollection.Add(new LuaSaveCollection(name, typeName));
                temp = globalSaveCollection.Last();
            }

            return(temp);
        }