コード例 #1
0
        private void primitiveRemoved(LDrawStep step, LDrawPrimitive part)
        {
            if (!(part is LDrawPart))
            {
                return;
            }

            if (customBrickData.ContainsKey(part as LDrawPart))
            {
                PluginLoader.Log("Detected a part removal from the UI. Removing also our extra data reference.");
                customBrickData.Remove(part as LDrawPart);
            }
        }
コード例 #2
0
        private void PartModified(LDrawPrimitive part)
        {
            PluginLoader.Log("part modified!");
            if (!(part is LDrawPart))
            {
                return;
            }

            LDrawPart modifiedPart = part as LDrawPart;

            if (customBrickData.ContainsKey(modifiedPart) == false)
            {
                return;
            }

            PluginLoader.Log("Part modified! " + customBrickData[modifiedPart].myID);
        }