Exemplo n.º 1
0
        public static bool InitComponentTypeId <TComponent>(bool isTag = false, bool isSimple = false, bool isCopyable = false, bool isDisposable = false, bool isVersioned = false, bool isVersionedNoState = false, bool isShared = false, bool isOneShot = false)
        {
            var isNew = (AllComponentTypes <TComponent> .typeId == -1);

            if (isTag == true)
            {
                WorldUtilities.SetComponentAsTag <TComponent>();
            }
            if (isSimple == true)
            {
                WorldUtilities.SetComponentAsSimple <TComponent>();
            }
            if (isVersioned == true)
            {
                WorldUtilities.SetComponentAsVersioned <TComponent>();
            }
            if (isVersionedNoState == true)
            {
                WorldUtilities.SetComponentAsVersionedNoState <TComponent>();
            }
            if (isCopyable == true)
            {
                WorldUtilities.SetComponentAsCopyable <TComponent>();
            }
            if (isShared == true)
            {
                WorldUtilities.SetComponentAsShared <TComponent>();
            }
            if (isDisposable == true)
            {
                WorldUtilities.SetComponentAsDisposable <TComponent>();
            }
            if (isOneShot == true)
            {
                WorldUtilities.SetComponentAsOneShot <TComponent>();
            }

            WorldUtilities.GetAllComponentTypeId <TComponent>();

            return(isNew);
        }