예제 #1
0
        public static void Create(MonoEntity a)
        {
            int len = storageActor.Length;

            if (lastID >= len)
            {
                Array.Resize(ref storageActor, lastID << 1);
            }

            if (prevID.Count > 0)
            {
                a.entity = prevID.Pop();
                storageActor[a.entity] = a;
            }
            else
            {
                a.entity = lastID;
                storageActor[lastID++] = a;
            }

            Tags.Add(a.entity);
        }
예제 #2
0
 /// <summary>
 /// <para>Checks if MonoEntity exist and enabled</para>
 /// </summary>
 /// <param name="mono"></param>
 /// <returns>Returns true if exist and enabled</returns>
 public static bool IsActive(this MonoEntity mono)
 {
     return(mono != null && mono.conditionEnabled);
 }
 /// <summary>
 /// <para>Checks if MonoEntity exist and enabled</para>
 /// </summary>
 /// <param name="mono"></param>
 /// <returns>Returns true if exist and enabled</returns>
 public static bool Exists(this MonoEntity mono)
 {
     return(mono != null && mono.conditionEnabled);
 }