Esempio n. 1
0
        public static T[] GetTuples <T>(this World world) where T : ITuple, new ()
        {
            List <T> a = new List <T>();

            string[] fileds = TupleTypeMgr.Get(typeof(T).Name);
            foreach (var item in world.Entities())
            {
                if (item.HasComponents(fileds))
                {
                    T aaa = new T();
                    aaa.SetCmps(item);
                    a.Add(aaa);
                }
            }
            return(a.ToArray());
        }